Skip to content

Commit e1e3124

Browse files
committed
Add roles field to root user setup examples
1 parent e1593c0 commit e1e3124

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/cloud/root-user-setup.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ WARNING: *Security Notice*: The root user has complete access to your instance.
3333
----
3434
curl -X PUT [INSTANCE-URL]/users/root \
3535
-H "Authorization: Bearer [JWT]" \
36-
-d '{"password": "[YOUR-PASSWORD]"}'
36+
-d '{"password": "[YOUR-PASSWORD]", "roles": ["root"]}'
3737
----
3838

3939
==== HTTPie
@@ -42,7 +42,8 @@ curl -X PUT [INSTANCE-URL]/users/root \
4242
----
4343
http PUT [INSTANCE-URL]/users/root \
4444
Authorization:"Bearer [JWT]" \
45-
password=[YOUR-PASSWORD]
45+
password=[YOUR-PASSWORD] \
46+
roles:='["root"]'
4647
----
4748

4849
==== JavaScript
@@ -51,7 +52,7 @@ http PUT [INSTANCE-URL]/users/root \
5152
----
5253
fetch('[INSTANCE-URL]/users/root', {
5354
method: 'PUT',
54-
body: JSON.stringify({ "password": "[YOUR-PASSWORD]" }),
55+
body: JSON.stringify({ "password": "[YOUR-PASSWORD]", "roles": ["root"] }),
5556
headers: {
5657
'Authorization': 'Bearer [JWT]'
5758
}
@@ -75,7 +76,6 @@ The admin permission (`/_acl/rootCanDoEverything`) grants full access to all end
7576
- *Priority*: `0` - High priority permission
7677
- *MongoDB Options*: Enables all management operations
7778

78-
7979
==== cURL
8080

8181
[source,bash]

0 commit comments

Comments
 (0)