diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index 9eba979e40..211a6d97d0 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -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') diff --git a/composer.lock b/composer.lock index 671f322066..4519d44335 100644 --- a/composer.lock +++ b/composer.lock @@ -5384,5 +5384,5 @@ "platform-overrides": { "php": "8.0" }, - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } diff --git a/tests/e2e/Services/Databases/DatabasesBase.php b/tests/e2e/Services/Databases/DatabasesBase.php index 114a80dd3b..bcf8168131 100644 --- a/tests/e2e/Services/Databases/DatabasesBase.php +++ b/tests/e2e/Services/Databases/DatabasesBase.php @@ -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, ]);