Description
On databases other than "admin", db.addUser("user", "password") will be equivalent to
db.addUser({user: "user", pwd: "password", roles: ["dbOwner"]})
|
On databases other than "admin", db.addUser("user", "password", true) will be equivalent to
db.addUser({user: "user", pwd: "password", roles: ["read"]})
|
On the "admin" database, db.addUser("user", "password") will be equivalent to
db.addUser({user: "user", pwd: "password", roles: ["root"]})
|
On the "admin" database, db.addUser("user", "password", true) will be equivalent to
db.addUser({user: "user", pwd: "password", roles: ["readAnyDatabase"]})
|
Any use of these 2- and 3-argument forms of db.addUser() will cause the shell to display a warning message to the user, and may cause the server to write a warning message to the startupWarnings log and perhaps the diagnostic log, indicating that this form is deprecated, and will be removed in a future release of MongoDB.
There will be no db.addUser("user", "password", [roles]) form of the addUser command in 2.6.
Attachments
Issue Links
- is depended on by
-
DRIVERS-103 Manipulate user objects exclusively via commands
-
- Closed
-
- is duplicated by
-
SERVER-10593 Expose built-in roles that can be used with the deprecated addUser helper that just takes a readOnly bool
-
- Closed
-
- related to
-
SERVER-6246 Manipulate user objects exclusively via commands
-
- Closed
-