summaryrefslogtreecommitdiff
path: root/jstests/auth
diff options
context:
space:
mode:
authorSpencer T Brody <spencer@10gen.com>2014-01-07 19:06:21 -0500
committerSpencer T Brody <spencer@10gen.com>2014-01-08 18:18:13 -0500
commitc3aff7ead075d1ed955d072e083b8527b4bc07fe (patch)
tree28e7001e44f1949deb3130fa93314c80f3b90587 /jstests/auth
parentdfdfcefb7d0d7c484ffb6ca2519ec2e0272e25d7 (diff)
downloadmongo-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.js39
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",