You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Accesscontrol seems to support extending permissions from a parent to child but does not seem to support inheriting permissions more than one level up i.e. grandparent -> parent -> child
e.g. viewer -> ops -> admin where viewer has read, ops read/update and admin read/update/delete
accessControl.grant('viewer').readAny('devices');
accessControl.grant('ops').extend('viewer').updateAny('devices');
accessControl.grant('admin').extend('ops').deleteAny('devices');
console.log(`accessControl.getGrants()=${JSON.stringify(accessControl.getGrants())}`);
assert(accessControl.can('ops').readAny('devices').granted);
assert('admin can reay any devices=' + accessControl.can('admin').readAny('devices').granted);
Correct or have I set up my grants incorrectly?
The text was updated successfully, but these errors were encountered:
Your grants are perfect. The default behaviour should be full-inheritance. It seems extended roles are not acquired recursively while querying for permissions.
Accesscontrol seems to support extending permissions from a parent to child but does not seem to support inheriting permissions more than one level up i.e. grandparent -> parent -> child
e.g. viewer -> ops -> admin where viewer has read, ops read/update and admin read/update/delete
Correct or have I set up my grants incorrectly?
The text was updated successfully, but these errors were encountered: