summaryrefslogtreecommitdiff
path: root/jstests/auth/basic_role_auth.js
diff options
context:
space:
mode:
authorDianna Hohensee <dianna.hohensee@10gen.com>2018-08-27 13:06:38 -0400
committerDianna Hohensee <dianna.hohensee@10gen.com>2018-08-29 16:47:09 -0400
commit4cb0742947dabee476c9979cae39c728a21568d5 (patch)
tree8ec6baacaab48a11b20eae4781f32be1bdad6ec2 /jstests/auth/basic_role_auth.js
parentaa36a9e8ad8c98e828f1b53966672b368d973380 (diff)
downloadmongo-4cb0742947dabee476c9979cae39c728a21568d5.tar.gz
SERVER-36015 Remove references to system.namespaces and system.indexes
Diffstat (limited to 'jstests/auth/basic_role_auth.js')
-rw-r--r--jstests/auth/basic_role_auth.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/jstests/auth/basic_role_auth.js b/jstests/auth/basic_role_auth.js
index 81e1518152c..f21ef40d962 100644
--- a/jstests/auth/basic_role_auth.js
+++ b/jstests/auth/basic_role_auth.js
@@ -120,7 +120,12 @@ var testOps = function(db, allowedActions) {
});
checkErr(allowedActions.hasOwnProperty('index_r'), function() {
- db.system.indexes.findOne();
+ var errorCodeUnauthorized = 13;
+ var res = db.runCommand({"listIndexes": "user"});
+
+ if (res.code == errorCodeUnauthorized) {
+ throw Error("unauthorized listIndexes")
+ }
});
checkErr(allowedActions.hasOwnProperty('index_w'), function() {