Identify the directive in the loadPermissions function
Closed this issue · 1 comments
wfpaisa commented
I'm submitting a...
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[x] Feature request
[ ] Documentation issue or request
Current behavior
be able to identify the type of directive to be able to make an Only or an except
Expected behavior
<div
... *ngxPermissionsOnly="['PCO_SADM']"
... *ngxPermissionsExcept="['PCO_SADM']"
>
this.permissions.loadPermissions(roles, (permissionName, permissionStore, permissionType <----) => {
----> console.log('-- permissionType:', permissionType);
if(permissionType === '~only') return ...
if(permissionType === '~exept') return...
return !!permissionStore[permissionName as string];
});
AlexKhymenko commented
@wfpaisa Can You please create pr for this feature?