diff options
author | Spencer T Brody <spencer@10gen.com> | 2013-10-10 20:04:15 -0400 |
---|---|---|
committer | Spencer T Brody <spencer@10gen.com> | 2013-10-11 18:14:12 -0400 |
commit | f0c6cebd73410c711ff2fc1167f7bded692dad1e (patch) | |
tree | d01f5609418387d75701adcd373fd59caa571353 /jstests/sharding/authCommands.js | |
parent | 100fc6d278597a4e119ac70b07b0f7c38cd2c4ab (diff) | |
download | mongo-f0c6cebd73410c711ff2fc1167f7bded692dad1e.tar.gz |
SERVER-10794 Maintain backwards-compatible form of addUser for one more release
Diffstat (limited to 'jstests/sharding/authCommands.js')
-rw-r--r-- | jstests/sharding/authCommands.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/jstests/sharding/authCommands.js b/jstests/sharding/authCommands.js index 46153011c30..a8fec8de846 100644 --- a/jstests/sharding/authCommands.js +++ b/jstests/sharding/authCommands.js @@ -24,19 +24,19 @@ var rwUser = 'rwUser'; var roUser = 'roUser'; var password = 'password'; -adminDB.addUser( rwUser, password, false, st.rs0.numNodes ); +adminDB.addUser({user: rwUser, pwd: password, roles: jsTest.basicUserRoles}, st.rs0.numNodes ); assert( adminDB.auth( rwUser, password ) ); adminDB.addUser( roUser, password, true ); -testDB.addUser( rwUser, password, false, st.rs0.numNodes ); -testDB.addUser( roUser, password, true, st.rs0.numNodes ); +testDB.addUser({user: rwUser, pwd: password, roles: jsTest.basicUserRoles}, st.rs0.numNodes ); +testDB.addUser({user: roUser, pwd: password, roles: jsTest.basicUserRoles}, st.rs0.numNodes ); authenticatedConn = new Mongo( mongos.host ); authenticatedConn.getDB( 'admin' ).auth( rwUser, password ); // Add user to shards to prevent localhost connections from having automatic full access -st.rs0.getPrimary().getDB( 'admin' ).addUser( 'user', 'password', false, 3 ); -st.rs1.getPrimary().getDB( 'admin' ).addUser( 'user', 'password', false, 3 ); +st.rs0.getPrimary().getDB( 'admin' ).addUser({user: 'user', pwd: 'password', roles: jsTest.basicUserRoles}, 3 ); +st.rs1.getPrimary().getDB( 'admin' ).addUser({user: 'user', pwd: 'password', roles: jsTest.basicUserRoles}, 3 ); |