From 6d25eb81b6845e2506a4a3579835e17bcb26f702 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Sun, 14 Sep 2025 10:58:21 +1200 Subject: [PATCH] Move disable --- app/controllers/shared/api.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 1acf2c8ea6..ea516c0f96 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -241,10 +241,11 @@ App::init() $role = $apiKey->getRole(); $scopes = $apiKey->getScopes(); - // Disable authorization checks for API keys - Authorization::setDefaultStatus(false); if ($apiKey->getRole() === Auth::USER_ROLE_APPS) { + // Disable authorization checks for API keys + Authorization::setDefaultStatus(false); + $user = new Document([ '$id' => '', 'status' => true,