1
0
Fork 0
mirror of synced 2024-06-29 19:50:26 +12:00

Mark permissions optional param

This commit is contained in:
Matej Bačo 2022-09-01 13:14:15 +00:00
parent c5c3b2ecf0
commit c3d04848f4
3 changed files with 3 additions and 3 deletions

View file

@ -486,7 +486,7 @@ App::post('/v1/databases/:databaseId/collections')
->param('databaseId', '', new UID(), 'Database ID.')
->param('collectionId', '', new CustomId(), 'Unique Id. Choose your own unique ID or pass the string "unique()" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.')
->param('name', '', new Text(128), 'Collection name. Max length: 128 chars.')
->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permissions strings. By default no user is granted with any permissions. [Learn more about permissions](/docs/permissions).')
->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permissions strings. By default no user is granted with any permissions. [Learn more about permissions](/docs/permissions).', true)
->param('documentSecurity', false, new Boolean(true), 'Enables configuring permissions for individual documents. A user needs one of document or collection level permissions to access a document. [Learn more about permissions](/docs/permissions).')
->inject('response')
->inject('dbForProject')

2
composer.lock generated
View file

@ -5384,5 +5384,5 @@
"platform-overrides": {
"php": "8.0"
},
"plugin-api-version": "2.2.0"
"plugin-api-version": "2.3.0"
}

View file

@ -244,7 +244,7 @@ trait DatabasesBase
]), [
'collectionId' => ID::unique(),
'name' => 'Response Models',
'permissions' => [],
// 'permissions' missing on purpose to make sure it's optional
'documentSecurity' => true,
]);