-
Type:
New Feature
-
Resolution: Won't Fix
-
Priority:
Major - P3
-
None
-
Affects Version/s: 2.12.1
-
Component/s: API, Authentication
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
MongoDB 2.6.0 deprecates the db.addUser() and recommends the db.createUser() command.
However, the Java API deprecates the db.addUser() method and suggests using the low-level db.command() method:
/** * Adds or updates a user for this database * * @param username the user name * @param passwd the password * @return the result of executing this operation * @throws MongoException * @mongodb.driver.manual administration/security-access-control/ Access Control * @deprecated Use {@code DB.command} to call either the addUser or updateUser command */ @Deprecated public WriteResult addUser( String username , char[] passwd ){ return addUser(username, passwd, false); }
MongoDB Java Driver API should support db.createUser() as a replacement to db.addUser() (taking into account server version).
Related to SERVER-3301.