-
Hello, basically everything works quite well. I use the teams function. I get the permissions and roles of the current team reliably. But I would like to check in a controller if the current user has a special permission in another team. E.g. user Tim is logged into team A and I would now like to check if he has a specific permission in teams B,C and D. Unfortunately I do not get this done. Even if I set the other team before with setPermissionsTeamId(), $user->HasPermissionTo() or $user->can() always returns only the permissions of the current team. What am I doing wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Maybe this scopes could help you |
Beta Was this translation helpful? Give feedback.
Maybe this scopes could help you
https://github.com/spatie/laravel-permission/pull/1948/files
Also this trick could help
https://github.com/spatie/laravel-permission/pull/1845/files