diff --git a/src/ServiceProviderAbstract.php b/src/ServiceProviderAbstract.php index 51770e4..8538e8d 100644 --- a/src/ServiceProviderAbstract.php +++ b/src/ServiceProviderAbstract.php @@ -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)) {