Need to check if user has a permission via one of their roles #2330
-
I am trying to prevent attaching a permission directly to a user if they have said permission via one of their roles and Code in controller if ($user->hasPermissionViaRole($permission)) {
// do not allow attaching permission directly
} Gives this error
QuestionAny reason |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
just override it in the User model or make a PR to change it |
Beta Was this translation helpful? Give feedback.
-
Also, |
Beta Was this translation helpful? Give feedback.
just override it in the User model or make a PR to change it