Skip to content
New issue

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

Feature request: can disable ability check (RBAC) #457

Open
1 task done
margarizaldi opened this issue Jul 18, 2024 · 0 comments
Open
1 task done

Feature request: can disable ability check (RBAC) #457

margarizaldi opened this issue Jul 18, 2024 · 0 comments
Labels
Scope: Improvement Proposed improvements, or feature additions.

Comments

@margarizaldi
Copy link

Checklist

Description

The way this package checks the ability in Gate prevents me to use permissions (using spatie/permission) that contain : character. Although I can rename all my permissions, I think that shouldn't be the solution...

// ServiceProviderAbstract

$gate->before(static function (?Authenticatable $user, ?string $ability) {
    $guard = auth()->guard();

    // ⭐ maybe add one more condition (e.g.) ! config('auth0.enable_rbac')
    if (! $guard instanceof GuardContract || ! $user instanceof Authenticatable || ! is_string($ability)) {
        return;
    }

    // ...
});
@evansims evansims added the Scope: Improvement Proposed improvements, or feature additions. label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Improvement Proposed improvements, or feature additions.
Projects
None yet
Development

No branches or pull requests

2 participants