Skip to content

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

Open
@margarizaldi

Description

@margarizaldi

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;
    }

    // ...
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    Scope: ImprovementProposed improvements, or feature additions.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions