-
Hello everyone! Is there anyway that I can pass multiple rules to For example right now if user has verified email he can manage all stuff, but in changeEmail mutation resolver I don't use It would be nice to have an ability pass multiple rules to |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @smashboy "manage" and "all" are reserved words that match any resource and any ability.
If a user I'm not sure if I understand your question correctly, but feel free to provide more examples if this isn't enough. |
Beta Was this translation helpful? Give feedback.
Hi @smashboy "manage" and "all" are reserved words that match any resource and any ability.
Guard.authorize("update", "user", resolver)
is how you should use it, and in the ability file you can either give the user the specific habilitycan("update", "user")
orcan("manage", "all")
if that's the case.If a user
can("manage", "all")
thenGuard.authorize
will always run the resolver.I'm not sure if I understand your question correctly, but feel free to provide more examples if this isn't enough.