From 2c4a1a90720994517e7ecc2d16f70139c8357a5e Mon Sep 17 00:00:00 2001 From: Bob Grabar Date: Fri, 22 Feb 2013 17:24:53 -0500 Subject: [PATCH] DOCS-1153 add an example to db.addUser() --- source/reference/method/db.addUser.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/reference/method/db.addUser.txt b/source/reference/method/db.addUser.txt index 2bfd0b01f61..b09b31ec644 100644 --- a/source/reference/method/db.addUser.txt +++ b/source/reference/method/db.addUser.txt @@ -4,7 +4,7 @@ db.addUser() .. default-domain:: mongodb -.. method:: db.addUser("username", "password"[, readOnly]) +.. method:: db.addUser("username", "password" [, readOnly] ) :param string username: Specifies a new username. @@ -17,3 +17,9 @@ db.addUser() username and password as arguments to the command. If you want to restrict the user to have only read-only privileges, supply a true third argument; however, this defaults to false. + + For example: + + .. code-block:: javascript + + db.addUser("user1" , "pass" , { readOnly : true } )