File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ WARNING: *Security Notice*: The root user has complete access to your instance.
33
33
----
34
34
curl -X PUT [INSTANCE-URL]/users/root \
35
35
-H "Authorization: Bearer [JWT]" \
36
- -d '{"password": "[YOUR-PASSWORD]"}'
36
+ -d '{"password": "[YOUR-PASSWORD]", "roles": ["root"] }'
37
37
----
38
38
39
39
==== HTTPie
@@ -42,7 +42,8 @@ curl -X PUT [INSTANCE-URL]/users/root \
42
42
----
43
43
http PUT [INSTANCE-URL]/users/root \
44
44
Authorization:"Bearer [JWT]" \
45
- password=[YOUR-PASSWORD]
45
+ password=[YOUR-PASSWORD] \
46
+ roles:='["root"]'
46
47
----
47
48
48
49
==== JavaScript
@@ -51,7 +52,7 @@ http PUT [INSTANCE-URL]/users/root \
51
52
----
52
53
fetch('[INSTANCE-URL]/users/root', {
53
54
method: 'PUT',
54
- body: JSON.stringify({ "password": "[YOUR-PASSWORD]" }),
55
+ body: JSON.stringify({ "password": "[YOUR-PASSWORD]", "roles": ["root"] }),
55
56
headers: {
56
57
'Authorization': 'Bearer [JWT]'
57
58
}
@@ -75,7 +76,6 @@ The admin permission (`/_acl/rootCanDoEverything`) grants full access to all end
75
76
- *Priority*: `0` - High priority permission
76
77
- *MongoDB Options*: Enables all management operations
77
78
78
-
79
79
==== cURL
80
80
81
81
[source,bash]
You can’t perform that action at this time.
0 commit comments