From ffce3ca400e2407b78cc0ca3f2aa7b1fbc40c693 Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Thu, 14 May 2026 10:03:28 +0100 Subject: [PATCH] Tighten permissions comment on createApiKey MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drop the endpoint-scope tangent — the comment is about why we picked this value, not about whether doc perms get enforced. --- src/Migration/Destinations/Appwrite.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Migration/Destinations/Appwrite.php b/src/Migration/Destinations/Appwrite.php index 3430d6f4c8..f62fa09ea3 100644 --- a/src/Migration/Destinations/Appwrite.php +++ b/src/Migration/Destinations/Appwrite.php @@ -3151,9 +3151,8 @@ class Appwrite extends Destination try { $this->dbForPlatform->createDocument('keys', new UtopiaDocument([ '$id' => ID::unique(), - // SDK's Key model doesn't expose $permissions, so we can't read the source doc's perms. - // Mirror appwrite/appwrite's createKey controller default — `dbForPlatform.keys` is - // gated by endpoint scope, not document perms, so this is the upstream invariant. + // SDK's Key model doesn't expose $permissions, so we can't copy source perms through. + // Mirror appwrite/appwrite's createKey controller so migrated docs match natively-created keys. '$permissions' => [ Permission::read(Role::any()), Permission::update(Role::any()),