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

@@ -1,6 +1,7 @@
import intl from 'react-intl-universal';
import { RESOURCES_TYPES } from '../../common/resourcesTypes';
import { AbilitySubject, VendorAction } from '../../common/abilityOption';
import withDrawerActions from '../Drawer/withDrawerActions';
/**
@@ -43,4 +44,8 @@ export const universalSearchVendorBind = () => ({
optionItemLabel: intl.get('vendors'),
selectItemAction: VendorUniversalSearchSelectAction,
itemSelect: vendorToSearch,
permission: {
ability: VendorAction.View,
subject: AbilitySubject.Vendor,
},
});