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
[ ] 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
Currently there is no property in permissions object to handle a case when we need to allow access user with PERMISSION_1 or PERMISSION_2.
Expected behavior
I would expect new property oneOf that will check if user has one of listed permissions. This property should work with other properties as well (only, except).
@AlexKhymenko thanks for the fast answer and proposed solution. Adding custom permission is a great feature that seems to be the cure for many problems. However I'm not a fan of mutating (in this case creating special permissions just for frontend purposes) and for me it would be great to handle it on route object definition level (that's more transparent).
If you would need some help with providing the solution I'm open to contribute.
I'm submitting a...
Current behavior
Currently there is no property in
permissions
object to handle a case when we need to allow access user with PERMISSION_1 or PERMISSION_2.Expected behavior
I would expect new property
oneOf
that will check if user has one of listed permissions. This property should work with other properties as well (only
,except
).Example:
NgxPermissionGuard
should check it in following way:permissions.has('POST_WRITER') && (permissions.has('MODERATOR') || permissions.has('REPORTER'))
The text was updated successfully, but these errors were encountered: