feat: universal search permissions access control.

This commit is contained in:
a.bouhuolia
2021-11-27 17:22:29 +02:00
parent 56ab0a68e2
commit 3db00f6f70
14 changed files with 142 additions and 39 deletions

View File

@@ -7,6 +7,7 @@ import { T, Icon, Choose, If } from 'components';
import { RESOURCES_TYPES } from 'common/resourcesTypes';
import withDrawerActions from '../../Drawer/withDrawerActions';
import { AbilitySubject, BillAction } from '../../../common/abilityOption';
/**
* Universal search bill item select action.
@@ -116,4 +117,8 @@ export const universalSearchBillBind = () => ({
selectItemAction: BillUniversalSearchSelect,
itemRenderer: BillUniversalSearchItem,
itemSelect: billsToSearch,
permission: {
ability: BillAction.View,
subject: AbilitySubject.Bill,
},
});