diff options
author | Merry Mou <merry.mou@mongodb.com> | 2015-08-20 11:41:54 -0400 |
---|---|---|
committer | Merry Mou <merry.mou@mongodb.com> | 2015-08-21 16:06:42 -0400 |
commit | 0c695aa1e879af482dc3aea4768dbda223ff4592 (patch) | |
tree | d7bbb6da6c5ce72152a3378603132812e1d00401 /jstests/auth | |
parent | 024c4e0e10223d5d4156f748f567b992e29aaab0 (diff) | |
download | mongo-0c695aa1e879af482dc3aea4768dbda223ff4592.tar.gz |
SERVER-13647 give restore privileges to root
Diffstat (limited to 'jstests/auth')
-rw-r--r-- | jstests/auth/renameSystemCollections.js | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/jstests/auth/renameSystemCollections.js b/jstests/auth/renameSystemCollections.js index 4537c1e0da4..81de51de575 100644 --- a/jstests/auth/renameSystemCollections.js +++ b/jstests/auth/renameSystemCollections.js @@ -72,25 +72,6 @@ assert.eq(CodeUnauthorized, res.code); assert.eq(null, adminDB.system.users.findOne({user: backdoorUserDoc.user})); assert.neq(null, adminDB.system.users.findOne({user:'userAdmin'})); -adminDB.auth('root', 'password'); -adminDB.users.drop(); -adminDB.users.insert(backdoorUserDoc); - -jsTestLog("Test that with root you CANNOT rename to/from system.users"); -var res = adminDB.system.users.renameCollection("users"); -assert.eq(0, res.ok); -assert.eq(CodeUnauthorized, res.code); -assert.eq(5, adminDB.system.users.count()); - -adminDB.users.drop(); -adminDB.users.insert(backdoorUserDoc); -var res = adminDB.users.renameCollection("system.users"); -assert.eq(0, res.ok); -assert.eq(CodeUnauthorized, res.code); - -assert.eq(null, adminDB.system.users.findOne({user: backdoorUserDoc.user})); -assert.neq(null, adminDB.system.users.findOne({user:'userAdmin'})); - adminDB.auth('rootier', 'password'); jsTestLog("Test that with __system you CAN rename to/from system.users"); |