Skip to content

Commit

Permalink
Update ServiceProviderAbstract.php
Browse files Browse the repository at this point in the history
  • Loading branch information
margarizaldi committed Jul 18, 2024
1 parent c50c6cb commit cb8a2b5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ServiceProviderAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ final public function boot(
});

$gate->before(static function (?Authenticatable $user, ?string $ability) {
if (true === config('auth0.disableAccessControl')) {
return;
}

$guard = auth()->guard();

if (! $guard instanceof GuardContract || ! $user instanceof Authenticatable || ! is_string($ability)) {
Expand Down

0 comments on commit cb8a2b5

Please sign in to comment.