mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 05:40:31 +00:00
feat: universal search permissions access control.
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import intl from 'react-intl-universal';
|
||||
import { RESOURCES_TYPES } from '../../common/resourcesTypes';
|
||||
|
||||
import withDrawerActions from '../Drawer/withDrawerActions';
|
||||
|
||||
import { AbilitySubject, AccountAction } from '../../common/abilityOption';
|
||||
import { RESOURCES_TYPES } from '../../common/resourcesTypes';
|
||||
|
||||
function AccountUniversalSearchItemSelectComponent({
|
||||
// #ownProps
|
||||
resourceType,
|
||||
@@ -42,4 +45,8 @@ export const universalSearchAccountBind = () => ({
|
||||
optionItemLabel: intl.get('accounts'),
|
||||
selectItemAction: AccountUniversalSearchItemSelect,
|
||||
itemSelect: accountToSearch,
|
||||
permission: {
|
||||
ability: AccountAction.View,
|
||||
subject: AbilitySubject.Account,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user