From cb8a2b536b0bfaab3813cd953cf4e403c29eed4c Mon Sep 17 00:00:00 2001 From: Marga Rizaldi Date: Thu, 18 Jul 2024 16:13:58 +0700 Subject: [PATCH] Update ServiceProviderAbstract.php --- src/ServiceProviderAbstract.php | 4 ++++ 1 file changed, 4 insertions(+) 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)) {