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
Is there an option to set-up accesscontrol that some group of users, lets say Moderators,
can only create resource for everybody else, but not for themselves? Currently I did it like this: { role: 'moderator', resource: 'thing', action: 'create:any', attributes: 'createAnyButNotOwn' },
and then when checking for own:
let permission = null;
if (owned) {
permission = ac.can( user.role ... etc );
if (permission.attributes.indexOf('createAnyButNotOwn') > -1) {
permission = false;
}
}
Is there a better way? Thanks
The text was updated successfully, but these errors were encountered:
Is there an option to set-up accesscontrol that some group of users, lets say Moderators,
can only create resource for everybody else, but not for themselves? Currently I did it like this:
{ role: 'moderator', resource: 'thing', action: 'create:any', attributes: 'createAnyButNotOwn' },
and then when checking for own:
Is there a better way? Thanks
The text was updated successfully, but these errors were encountered: