Skip to content

Commit ffce3ca

Browse files
committed
Tighten permissions comment on createApiKey
Drop the endpoint-scope tangent — the comment is about why we picked this value, not about whether doc perms get enforced.
1 parent 893d45d commit ffce3ca

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/Migration/Destinations/Appwrite.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3151,9 +3151,8 @@ protected function createApiKey(ApiKey $resource): bool
31513151
try {
31523152
$this->dbForPlatform->createDocument('keys', new UtopiaDocument([
31533153
'$id' => ID::unique(),
3154-
// SDK's Key model doesn't expose $permissions, so we can't read the source doc's perms.
3155-
// Mirror appwrite/appwrite's createKey controller default — `dbForPlatform.keys` is
3156-
// gated by endpoint scope, not document perms, so this is the upstream invariant.
3154+
// SDK's Key model doesn't expose $permissions, so we can't copy source perms through.
3155+
// Mirror appwrite/appwrite's createKey controller so migrated docs match natively-created keys.
31573156
'$permissions' => [
31583157
Permission::read(Role::any()),
31593158
Permission::update(Role::any()),

0 commit comments

Comments
 (0)