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
I can't seem to find a way to check for multiple abilities (logical OR) in the documentation:
My use case is:
Suppose there are 4 possible abilities ('A', 'B', 'C', 'D') on a resource "Product", I want a button to be visible to the user in case he has ability A or B .
I did came across "Define own aliases" in the readme which states that we can define "modify" alias as a combination of update and delete actions:
// user can modify only if he has bothupdate and delete permission
Ability.addAlias('modify', ['update', 'delete'])
but I need an "OR" case instead of "AND".
Any help would be appreciated. Thanks!
The text was updated successfully, but these errors were encountered:
I can't seem to find a way to check for multiple abilities (logical OR) in the documentation:
My use case is:
Suppose there are 4 possible abilities ('A', 'B', 'C', 'D') on a resource "Product", I want a button to be visible to the user in case he has ability A or B .
I did came across "Define own aliases" in the readme which states that we can define "modify" alias as a combination of update and delete actions:
but I need an "OR" case instead of "AND".
Any help would be appreciated. Thanks!
The text was updated successfully, but these errors were encountered: