Replies: 1 comment
-
Maybe |
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
-
Hi, loving this package and have been using it for many years, keep up the good work!
Recently ran into a scenario which I need to mask user roles base on session context. I have tried to use custom guards but I would need to have user->roles() return a dynamically generated list when session holds some value, while making sure when under a certain context, user->can, user->hasAnyroles, etc are all compatible. Currently disregard if I dynamically force guard using
getDefaultGuardName
, user->roles will still retuen all roles and permissions across all guard. Ideally, I want to have roles return a list when session key isA
and different role list when key isB
.Is there any ways we can achieve this?
Beta Was this translation helpful? Give feedback.
All reactions