summaryrefslogtreecommitdiff
path: root/jstests/auth/adduser_helper.js
diff options
context:
space:
mode:
authorSpencer T Brody <spencer@10gen.com>2013-11-07 17:23:42 -0500
committerSpencer T Brody <spencer@10gen.com>2013-11-11 16:37:19 -0500
commitb3af50b16b97b1db9711e8fa8ece33d3e001566b (patch)
tree9b3424330811172c37ab7fba065df6b7e928b2cc /jstests/auth/adduser_helper.js
parent8826cba78c4b75cb31a21c1f34002d23a611601b (diff)
downloadmongo-b3af50b16b97b1db9711e8fa8ece33d3e001566b.tar.gz
SERVER-10944 Prevent creating and granting roles on the $external database
Diffstat (limited to 'jstests/auth/adduser_helper.js')
-rw-r--r--jstests/auth/adduser_helper.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/jstests/auth/adduser_helper.js b/jstests/auth/adduser_helper.js
index 209eebb5172..ec4199e4f00 100644
--- a/jstests/auth/adduser_helper.js
+++ b/jstests/auth/adduser_helper.js
@@ -56,7 +56,7 @@ assert.eq(passwordHash('andy', 'newpassword'), userObj['credentials']['MONGODB-C
assert.throws(function() {db.addUser({user:'andy', pwd:'password', roles:['read']});});
// Create valid extended form external user
-db.getSiblingDB("$external").addUser({user:'spencer', roles:['readWrite']});
+db.getSiblingDB("$external").addUser({user:'spencer', roles:[{role: 'readWrite', db:'test'}]});
assert.eq(2, admin.system.users.count());
userObj = admin.system.users.findOne({user:'spencer', db:'$external'});
assert.eq('spencer', userObj['user']);