fix gitlab tests

This commit is contained in:
root
2026-06-09 02:32:58 -04:00
parent 20a0b6c4e5
commit 6def9993da
1489 changed files with 10449 additions and 11356 deletions
+3 -3
View File
@@ -15,7 +15,7 @@ class ApiDocsAuth
public function handle(Request $request, Closure $next): Response
{
$user = Auth::user();
if (! $user) {
if (!$user) {
$authHeader = (string) $request->header('Authorization');
if ($authHeader !== '' && stripos($authHeader, 'Bearer ') === 0) {
$token = trim(substr($authHeader, 7));
@@ -34,11 +34,11 @@ class ApiDocsAuth
}
}
if (! $user) {
if (!$user) {
return $this->deny('Unauthorized access to documentation.', 401);
}
if (! $this->userIsAdmin((int) $user->id)) {
if (!$this->userIsAdmin((int) $user->id)) {
return $this->deny('Admin privileges required.', 403);
}