From 0cee469d73f854ba64e372e74f13d376b1882f65 Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Thu, 12 Feb 2026 18:30:59 +0000 Subject: [PATCH] Pass all source project API key scopes to console key --- app/controllers/api/migrations.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/controllers/api/migrations.php b/app/controllers/api/migrations.php index 331c9c2628..6d2cec3f03 100644 --- a/app/controllers/api/migrations.php +++ b/app/controllers/api/migrations.php @@ -719,16 +719,15 @@ Http::get('/v1/migrations/appwrite/settings-key') } $scopes = $apiKey->getScopes(); - $settingsScopes = \array_values(\array_intersect($scopes, ['platforms.read', 'keys.read'])); - if (empty($settingsScopes)) { + if (empty($scopes)) { throw new Exception(Exception::GENERAL_UNAUTHORIZED_SCOPE); } $jwt = new JWT(System::getEnv('_APP_OPENSSL_KEY_V1'), 'HS256', 86400, 0); $consoleKey = $jwt->encode([ 'projectId' => 'console', - 'scopes' => $settingsScopes, + 'scopes' => $scopes, 'targetProjectId' => $project->getId(), ]);