diff options
author | Spencer T Brody <spencer@10gen.com> | 2014-01-07 19:06:21 -0500 |
---|---|---|
committer | Spencer T Brody <spencer@10gen.com> | 2014-01-08 18:18:13 -0500 |
commit | c3aff7ead075d1ed955d072e083b8527b4bc07fe (patch) | |
tree | 28e7001e44f1949deb3130fa93314c80f3b90587 /jstests/auth | |
parent | dfdfcefb7d0d7c484ffb6ca2519ec2e0272e25d7 (diff) | |
download | mongo-c3aff7ead075d1ed955d072e083b8527b4bc07fe.tar.gz |
SERVER-12035 Allow clusterMonitor role to get the current profiling level
Diffstat (limited to 'jstests/auth')
-rw-r--r-- | jstests/auth/lib/commands_lib.js | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/jstests/auth/lib/commands_lib.js b/jstests/auth/lib/commands_lib.js index 7fbdf08545f..376e810b925 100644 --- a/jstests/auth/lib/commands_lib.js +++ b/jstests/auth/lib/commands_lib.js @@ -1610,7 +1610,7 @@ var authCommandsLib = { ] }, { - testname: "profile", + testname: "profile", command: {profile: 0}, skipSharded: true, testcases: [ @@ -1631,6 +1631,43 @@ var authCommandsLib = { ] }, { + testname: "profileGetLevel", + command: {profile: -1}, + skipSharded: true, + testcases: [ + { + runOnDb: firstDbName, + roles: { + dbAdmin: 1, + dbAdminAnyDatabase: 1, + dbOwner: 1, + clusterMonitor: 1, + clusterAdmin: 1, + root: 1, + __system: 1 + }, + privileges: [ + { resource: {db: firstDbName, collection: "system.profile"}, + actions: ["find"] } + ] + }, + { + runOnDb: secondDbName, + roles: { + dbAdminAnyDatabase: 1, + clusterMonitor: 1, + clusterAdmin: 1, + root: 1, + __system: 1 + }, + privileges: [ + { resource: {db: secondDbName, collection: "system.profile"}, + actions: ["find"] } + ] + } + ] + }, + { testname: "renameCollection_sameDb", command: {renameCollection: firstDbName + ".x", to: firstDbName + ".y", |