Skip to content

Commit e0bb382

Browse files
committed
add read/writeanyrole to user created in enable auth + remove unused step file
1 parent 8fcc03e commit e0bb382

File tree

2 files changed

+8
-66
lines changed

2 files changed

+8
-66
lines changed

source/includes/steps-add-user-administrator.yaml

Lines changed: 0 additions & 58 deletions
This file was deleted.

source/includes/steps-create-admin-then-enable-authentication.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,14 @@ title: Create the user administrator.
2929
level: 4
3030
ref: create-user-admin
3131
pre: |
32+
3233
In the ``admin`` database, add a user with the
33-
:authrole:`userAdminAnyDatabase` role. For example, the following
34-
creates the user ``myUserAdmin`` in the ``admin`` database:
34+
:authrole:`userAdminAnyDatabase` role. Include additional roles as
35+
needed for this user. For example, the following
36+
creates the user ``myUserAdmin`` in the ``admin`` database with the
37+
:authrole:`userAdminAnyDatabase` role and the
38+
:authrole:`readWriteAnyDatabase` role.
39+
3540
action:
3641
pre: |
3742
.. note::
@@ -48,7 +53,7 @@ action:
4853
{
4954
user: "myUserAdmin",
5055
pwd: "abc123",
51-
roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]
56+
roles: [ { role: "userAdminAnyDatabase", db: "admin" }, "readWriteAnyDatabase" ]
5257
}
5358
)
5459
post: |
@@ -121,11 +126,6 @@ pre: |
121126
:doc:`user-defined roles </core/security-user-defined-roles>` to the
122127
users.
123128
124-
The ``myUserAdmin`` user only has privileges to :doc:`manage users
125-
and roles </tutorial/manage-users-and-roles>`. As ``myUserAdmin``, if
126-
you attempt to perform any other operations, such as read from a
127-
``foo`` collection in the ``test`` database, MongoDB returns an error.
128-
129129
action:
130130
pre: |
131131
The following operation adds a user ``myTester`` to the ``test``

0 commit comments

Comments
 (0)