X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/3b3eb0f44fa96aecac58759f31da2f94bde64c5e..refs/pull/3630/head:/app/Http/Middleware/ApiAuthenticate.php diff --git a/app/Http/Middleware/ApiAuthenticate.php b/app/Http/Middleware/ApiAuthenticate.php index 508efa028..5d621ac11 100644 --- a/app/Http/Middleware/ApiAuthenticate.php +++ b/app/Http/Middleware/ApiAuthenticate.php @@ -50,11 +50,12 @@ class ApiAuthenticate } /** - * Check if the active session user has API access + * Check if the active session user has API access. */ protected function sessionUserHasApiAccess(): bool { $hasApiPermission = user()->can('access-api'); + return $hasApiPermission && hasAppAccess(); }