Replies: 1 comment
-
It looks like another approach would be to override the check created in |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In my application, I have groups of users. I know I can add the
HasRoles
trait to add roles to my groups, but I'm not sure how to extend the package to check a user's groups for role when performing the built in checks. I see theHasRoles
trait has a methodhasRole
but it does a lot of checks. Would it be logical to overridehasRole
in my user model, call the parent implementation, and if it returns false, callshasRole
with the provided roles on each group that the user has? I'm not sure if there are other internals that this would cause issue with. Also not sure if it would cause caching issues. Any help is greatly appreciated.Beta Was this translation helpful? Give feedback.
All reactions