You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/managed-mongodb-databases/how-to/manage-users.mdx
+68-9Lines changed: 68 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ You can create more users and grant them pre-set roles via the [Scaleway Managed
42
42
43
43
### How to create a user
44
44
45
-
1. Edit the POST request payload you will use to create your user. Replace the values of each parameters with your values of choice following the parameter descriptions below.
45
+
1. Edit the POST request payload you will use to create your user. Replace the values of each parameter with your values of choice following the parameter descriptions below.
46
46
```
47
47
{
48
48
"name": "<username>",
@@ -63,24 +63,83 @@ You can create more users and grant them pre-set roles via the [Scaleway Managed
All users you create will have the `read_write`, `db_admin` and `sync` roles by default.
93
+
94
+
You can follow the steps below to update a user's role(s) to the one(s) of your choice.
95
+
85
96
### How to apply a role to a user
86
97
98
+
1. Edit the POST request payload you will use to update the user role. Replace the values of each parameter with your values of choice following the parameter descriptions below.
99
+
100
+
In this example, we define a single `read_write` role for the user.
|`read_write`| Read and write rights on the database|
118
+
|`db_admin`||
119
+
|`sync`||
120
+
121
+
2. Run the following command to apply a new role to the user. Make sure you include the payload you edited in the previous step and that you replace the parameters in the call with your information. `{instance_id}` corresponds to the UUID of the Managed MongoDB®.
If the call was successful, you will get the payload with the new roles as a response.
140
+
141
+
<Messagetype="note">
142
+
Assigning roles upon user creation will be available shortly. Refer to the [Scaleway Changelog](/docs/changelog/?product=mongodb) to keep up with the latest Managed MongoDB® updates.
0 commit comments