We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when using multiple guards you cant define a "super user" for each guard because the before callback doesnt know what the guard is.
The guard is removed from the arguments here https://github.com/spatie/laravel-permission/blob/c99dca701d60e1a2d1f839c9bfd102b8098432fe/src/PermissionRegistrar.php#L126C26-L126C37
This might be necessary when an application has different admin portals and a user can be a super admin in one portal and not the other.
This would be a breaking change...
Gate::before
(Authorizable $user, string $ability, array $args = [])
Gate::authorize($permission, $guard)
Callback $args will be an empty array
$args
No response
6.7.0
n/a
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
when using multiple guards you cant define a "super user" for each guard because the before callback doesnt know what the guard is.
The guard is removed from the arguments here https://github.com/spatie/laravel-permission/blob/c99dca701d60e1a2d1f839c9bfd102b8098432fe/src/PermissionRegistrar.php#L126C26-L126C37
This might be necessary when an application has different admin portals and a user can be a super admin in one portal and not the other.
This would be a breaking change...
Steps To Reproduce
Gate::before
callback with 3 arguments,(Authorizable $user, string $ability, array $args = [])
Gate::authorize($permission, $guard)
Callback
$args
will be an empty arrayExample Application
No response
Version of spatie/laravel-permission package:
6.7.0
Version of laravel/framework package:
n/a
PHP version:
n/a
Database engine and version:
No response
OS: Windows/Mac/Linux version:
No response
The text was updated successfully, but these errors were encountered: