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: src/dev/integration/index.md
+40-6Lines changed: 40 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,13 @@ You can create new users and manage their roles using the following methods.
53
53
The following methods are available for Python API Client versions `0.10.0` or higher, using server versions `2025.2.0` or higher.
54
54
:::
55
55
56
+
Some of the following methods require a `workspace_role` argument. This must be provided as a member of the `WorkspaceRole` enum.
57
+
To use the enum, import it from the `common.py` module:
58
+
59
+
```python
60
+
from mergin.common import WorkspaceRole
61
+
```
62
+
56
63
### Create a user
57
64
58
65
```python
@@ -69,15 +76,17 @@ Arguments:
69
76
70
77
`workspace_id` (int) <spantitle="Ignored on Community edition servers">:information_source:</span> : The workspace ID where the user will be added.
71
78
72
-
`workspace_role` (string) <spantitle="Ignored on Community edition servers">:information_source:</span> : The user’s role in the workspace. [See the roles options](../../manage/permissions/index.md#workspace-member-roles-overview).
79
+
`workspace_role` (`WorkspaceRole` enum) <spantitle="Ignored on Community edition servers">:information_source:</span> : The user’s role in the workspace. [See the roles options](../../manage/permissions/index.md#workspace-member-roles-overview).
73
80
74
81
`username` (string, optional): If not provided, it will be automatically generated from the email address.
75
82
76
83
`notify_user` (Boolean, optional): If true, confirmation email and other email communication will be sent to the email address (invitations, access requests etc.). Default is `False`.
`workspace_id` (int): The workspace ID where the user will be invited.
167
+
168
+
`email` (string): The email of an existing user.
169
+
170
+
`workspace_role` (`WorkspaceRole` enum): The user’s role in the workspace. [See the roles options](../../manage/permissions/index.md#workspace-member-roles-overview).
171
+
145
172
---
146
173
147
174
### Project collaborators methods
@@ -156,6 +183,13 @@ The caller of the following methods must be a workspace admin, owner, project ow
156
183
157
184
The following methods accept project ids (of type `uuid`). You can find project id via <GitHubRepoid="MerginMaps/python-api-client/blob/634237890afd9f28f03953e5a01376b56f5abf5c/mergin/client.py#L572"desc="projects_list" /> and <GitHubRepoid="MerginMaps/python-api-client/blob/634237890afd9f28f03953e5a01376b56f5abf5c/mergin/client.py#L641"desc="project_info" /> methods.
158
185
186
+
Some of the following methods require a `project_role` argument. This must be provided as a member of the `ProjectRole` enum.
187
+
To use the enum, import it from the `common.py` module:
188
+
189
+
```python
190
+
from mergin.common import ProjectRole
191
+
```
192
+
159
193
#### List project collaborators
160
194
161
195
```python
@@ -179,7 +213,7 @@ Arguments:
179
213
180
214
`user` (string): Email or username of the user to be added to the project.
181
215
182
-
`project_role`: (string): Role of the user in the project. [See the roles options](../../manage/permissions/index.md#project-permissions-overview)
216
+
`project_role`: (`ProjectRole` enum): Role of the user in the project. [See the roles options](../../manage/permissions/index.md#project-permissions-overview)
183
217
184
218
#### Update project collaborator role
185
219
@@ -192,7 +226,7 @@ Arguments:
192
226
193
227
`user_id` (int): ID of the user.
194
228
195
-
`project_role`: (string): New role. [See the roles options](../../manage/permissions/index.md#project-permissions-overview)
229
+
`project_role`: (`ProjectRole` enum): New role. [See the roles options](../../manage/permissions/index.md#project-permissions-overview)
196
230
197
231
> The user must be first added to the project (via [Add project collaborator](./index.md#add-project-collaborator)) before calling this method, even if he/she is already a workspace member or guest.
198
232
@@ -207,7 +241,7 @@ Arguments:
207
241
208
242
`user_id` (int): ID of the user.
209
243
210
-
> The user account is not removed, only the project access.
244
+
> The user account is not removed, only the project access.
0 commit comments