mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
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.
This commit is contained in:
1 parent
893d45d9ea
commit
ffce3ca400
1 file changed
+2
-3
@@ -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()),
|
||||
|
||||
Reference in new issue
Block a user