| Steps To Reproduce: |
MongoDB shell version: 2.5.3-pre-
|
connecting to: 127.0.0.1:30999/test
|
mongos> use admin
|
switched to db admin
|
mongos> db.addUser({user: "admin", pwd: "password", roles: ["userAdminAnyDatabase", "readWriteAnyDatabase", "clusterAdmin"]})
|
{
|
"user" : "admin",
|
"roles" : [
|
"userAdminAnyDatabase",
|
"readWriteAnyDatabase",
|
"clusterAdmin"
|
]
|
}
|
mongos> db.auth("admin", "password")
|
1
|
mongos> use test
|
switched to db test
|
mongos> db.x.save({})
|
mongos> db.addUser({user: "x", pwd: "x", roles: ["readWriteAnyDatabase"]})
|
{ "user" : "x", "roles" : [ "readWriteAnyDatabase" ] }
|
mongos> db.auth("x", "x")
|
1
|
mongos> db.runCommand({renameCollection: "test.x", to: "test.y"})
|
{ "ok" : 1 }
|
The final command above should give the error "renameCollection may only be run against the admin database."
|