summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorKyle Suarez <ksuarz@gmail.com>2017-02-13 14:35:38 -0500
committerKyle Suarez <ksuarz@gmail.com>2017-02-13 14:35:38 -0500
commit8e1842875126b5dbefee425d764819e01aa5f67a (patch)
tree2e424405d0c41332cc077589c284303f7eb5db61 /jstests
parent0229bb4d9a3060697f5dfaf944cc468bc0690d87 (diff)
downloadmongo-8e1842875126b5dbefee425d764819e01aa5f67a.tar.gz
SERVER-26734 indexStats action is not sufficient for $indexStats
Diffstat (limited to 'jstests')
-rw-r--r--jstests/auth/lib/commands_lib.js21
1 files changed, 16 insertions, 5 deletions
diff --git a/jstests/auth/lib/commands_lib.js b/jstests/auth/lib/commands_lib.js
index 19aec71acc0..09052e99acc 100644
--- a/jstests/auth/lib/commands_lib.js
+++ b/jstests/auth/lib/commands_lib.js
@@ -549,11 +549,22 @@ var authCommandsLib = {
teardown: function(db) {
db.foo.drop();
},
- testcases: [{
- runOnDb: firstDbName,
- roles: {clusterMonitor: 1, clusterAdmin: 1, root: 1, __system: 1},
- privileges: [{resource: {anyResource: true}, actions: ["indexStats"]}]
- }]
+ testcases: [
+ {
+ runOnDb: firstDbName,
+ roles: roles_monitoring,
+ privileges:
+ [{resource: {db: firstDbName, collection: "foo"}, actions: ["indexStats"]}]
+ },
+ {
+ runOnDb: secondDbName,
+ roles: roles_monitoring,
+ privileges: [{
+ resource: {db: secondDbName, collection: "foo"},
+ actions: ["indexStats"]
+ }]
+ }
+ ]
},
{
testname: "appendOplogNote",