diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2021-03-21 22:46:19 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-03-22 03:34:46 +0000 |
commit | ce58b728e87056ede78d88d163a3708138be49e1 (patch) | |
tree | 9f136eeade40663ba93a62bc97bc0038e0b3c04c /src | |
parent | 95f8791e5fcbe1945a7ecb3284079c1d8371f212 (diff) | |
download | mongo-ce58b728e87056ede78d88d163a3708138be49e1.tar.gz |
SERVER-54526 Add access_check: simple to existing commands that have api_version == 1
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/SConscript | 2 | ||||
-rw-r--r-- | src/mongo/db/create_indexes.idl | 6 | ||||
-rw-r--r-- | src/mongo/db/drop.idl | 6 | ||||
-rw-r--r-- | src/mongo/db/drop_database.idl | 6 |
4 files changed, 20 insertions, 0 deletions
diff --git a/src/mongo/db/SConscript b/src/mongo/db/SConscript index 70ef8c1d168..b56b3b6f7b3 100644 --- a/src/mongo/db/SConscript +++ b/src/mongo/db/SConscript @@ -590,6 +590,7 @@ env.Library( ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/bson/mutable/mutable_bson', + '$BUILD_DIR/mongo/db/auth/authprivilege', '$BUILD_DIR/mongo/db/catalog/collection_options_idl', '$BUILD_DIR/mongo/db/commands/create_command', '$BUILD_DIR/mongo/db/query/explain_options', @@ -1405,6 +1406,7 @@ env.Library( 'create_indexes.idl', ], LIBDEPS_PRIVATE=[ + '$BUILD_DIR/mongo/db/auth/authprivilege', '$BUILD_DIR/mongo/db/catalog/commit_quorum_idl', '$BUILD_DIR/mongo/idl/idl_parser', ], diff --git a/src/mongo/db/create_indexes.idl b/src/mongo/db/create_indexes.idl index 139a4270c0d..12f629ed7e2 100644 --- a/src/mongo/db/create_indexes.idl +++ b/src/mongo/db/create_indexes.idl @@ -30,6 +30,7 @@ global: cpp_namespace: "mongo" imports: + - "mongo/db/auth/action_type.idl" - "mongo/db/catalog/commit_quorum.idl" - "mongo/idl/basic_types.idl" @@ -158,6 +159,11 @@ commands: namespace: concatenate_with_db cpp_name: CreateIndexesCommand api_version: "1" + access_check: + simple: + privilege: + resource_pattern: exact_namespace + action_type: createIndex reply_type: CreateIndexesReply strict: true fields: diff --git a/src/mongo/db/drop.idl b/src/mongo/db/drop.idl index aeaddde09a1..25c4e731cf3 100644 --- a/src/mongo/db/drop.idl +++ b/src/mongo/db/drop.idl @@ -32,6 +32,7 @@ global: - "mongo/util/uuid.h" imports: + - "mongo/db/auth/action_type.idl" - "mongo/idl/basic_types.idl" structs: @@ -61,3 +62,8 @@ commands: strict: true api_version: "1" reply_type: DropReply + access_check: + simple: + privilege: + resource_pattern: exact_namespace + action_type: dropCollection diff --git a/src/mongo/db/drop_database.idl b/src/mongo/db/drop_database.idl index 5083a0d8559..2ae5e27d412 100644 --- a/src/mongo/db/drop_database.idl +++ b/src/mongo/db/drop_database.idl @@ -30,6 +30,7 @@ global: cpp_namespace: "mongo" imports: + - "mongo/db/auth/action_type.idl" - "mongo/idl/basic_types.idl" commands: @@ -41,4 +42,9 @@ commands: cpp_name: DropDatabase strict: true api_version: "1" + access_check: + simple: + privilege: + resource_pattern: exact_namespace + action_type: dropDatabase reply_type: OkReply |