diff options
author | Spencer T Brody <spencer@mongodb.com> | 2015-03-03 15:19:45 -0500 |
---|---|---|
committer | Spencer T Brody <spencer@mongodb.com> | 2015-03-04 11:17:53 -0500 |
commit | 95dc9c1cc55f83d33f9db1a61edf5e1d81f76916 (patch) | |
tree | ac82f877a3d69ca1034538da932888122771b80a /jstests/auth/profile_access.js | |
parent | 3272a362429edbfa34fd6529e5925317f7b8a6e7 (diff) | |
download | mongo-95dc9c1cc55f83d33f9db1a61edf5e1d81f76916.tar.gz |
SERVER-16844 dbAdminAnyDatabase should be able to do anything dbAdmin can
Diffstat (limited to 'jstests/auth/profile_access.js')
-rw-r--r-- | jstests/auth/profile_access.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/jstests/auth/profile_access.js b/jstests/auth/profile_access.js index 9f4f95d405f..504b89d7931 100644 --- a/jstests/auth/profile_access.js +++ b/jstests/auth/profile_access.js @@ -10,6 +10,8 @@ adminDb.createUser({user:'admin', adminDb.auth('admin','password'); testDb.createUser({user:'readUser',pwd:'password',roles:['read']}); testDb.createUser({user:'dbAdminUser',pwd:'password',roles:['dbAdmin']}); +testDb.createUser({user:'dbAdminAnyDBUser',pwd:'password',roles:[{role: 'dbAdminAnyDatabase', + db: 'admin'}]}); testDb.setProfilingLevel(2); testDb.foo.findOne(); adminDb.logout(); @@ -21,4 +23,11 @@ testDb.logout(); testDb.auth('dbAdminUser','password'); testDb.setProfilingLevel(0); testDb.system.profile.drop(); +assert.commandWorked(testDb.createCollection("system.profile", {capped: true, size: 1024})); +testDb.logout(); + +// SERVER-16944 +testDb.auth('dbAdminAnyDBUser','password'); +testDb.setProfilingLevel(0); +testDb.system.profile.drop(); assert.commandWorked(testDb.createCollection("system.profile", {capped: true, size: 1024}));
\ No newline at end of file |