From fbb54a1f6da10968feb411b5bc9f239884c0b10a Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Thu, 10 Jun 2021 16:41:33 -0400 Subject: [PATCH] Add attribute and index scopes --- app/config/roles.php | 8 ++++++++ app/config/scopes.php | 12 ++++++++++++ tests/e2e/Scopes/ProjectCustom.php | 4 ++++ 3 files changed, 24 insertions(+) diff --git a/app/config/roles.php b/app/config/roles.php index 3e06ddbfd..1d1e761f0 100644 --- a/app/config/roles.php +++ b/app/config/roles.php @@ -11,6 +11,10 @@ $member = [ 'teams.write', 'documents.read', 'documents.write', + 'attributes.read', + 'attributes.write', + 'indexes.read', + 'indexes.write', 'files.read', 'files.write', 'projects.read', @@ -32,6 +36,10 @@ $admins = [ 'users.write', 'collections.read', 'collections.write', + 'attributes.read', + 'attributes.write', + 'indexes.read', + 'indexes.write', 'platforms.read', 'platforms.write', 'keys.read', diff --git a/app/config/scopes.php b/app/config/scopes.php index 088502c5d..cf40fb076 100644 --- a/app/config/scopes.php +++ b/app/config/scopes.php @@ -19,6 +19,18 @@ return [ // List of publicly visible scopes 'collections.write' => [ 'description' => 'Access to create, update, and delete your project\'s database collections', ], + 'attributes.read' => [ + 'description' => 'Access to read your project\'s database collection\'s attributes', + ], + 'attributes.write' => [ + 'description' => 'Access to create, update, and delete your project\'s database collection\'s attributes', + ], + 'indexes.read' => [ + 'description' => 'Access to read your project\'s database collection\'s indexes', + ], + 'indexes.write' => [ + 'description' => 'Access to create, update, and delete your project\'s database collection\'s indexes', + ], 'documents.read' => [ 'description' => 'Access to read your project\'s database documents', ], diff --git a/tests/e2e/Scopes/ProjectCustom.php b/tests/e2e/Scopes/ProjectCustom.php index 3f8028528..431762b6a 100644 --- a/tests/e2e/Scopes/ProjectCustom.php +++ b/tests/e2e/Scopes/ProjectCustom.php @@ -69,6 +69,10 @@ trait ProjectCustom 'teams.write', 'collections.read', 'collections.write', + 'attributes.read', + 'attributes.write', + 'indexes.read', + 'indexes.write', 'documents.read', 'documents.write', 'files.read',