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
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,9 +54,6 @@ You can create new users and manage their roles using the following methods.
54
54
The following methods are available for Python API Client versions `0.10.0` or higher, using server versions `2025.2.0` or higher.
55
55
:::
56
56
57
-
Some of the following methods require a `workspace_role` argument. This must be provided as a member of the `WorkspaceRole` enum.
58
-
To use the enum, import it from the `common.py` module:
59
-
60
57
```python
61
58
from mergin.common import WorkspaceRole
62
59
```
@@ -77,7 +74,11 @@ Arguments:
77
74
78
75
`workspace_id` (int) <spantitle="Ignored on Community edition servers">:information_source:</span> : The workspace ID where the user will be added.
79
76
80
-
`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).
77
+
`workspace_role` (string or `WorkspaceRole` enum) <spantitle="Ignored on Community edition servers">:information_source:</span> : The user’s role in the workspace.
78
+
79
+
- String: Pass the role name directly (e.g., "guest", "reader", "editor").
80
+
- Enum: Pass a member of the `WorkspaceRole` enum (requires importing from mergin.common)
81
+
-[See the roles options](../../manage/permissions/index.md#workspace-member-roles-overview).
81
82
82
83
`username` (string, optional): If not provided, it will be automatically generated from the email address.
83
84
@@ -135,7 +136,7 @@ Arguments:
135
136
136
137
`user_id` (int): ID of the user.
137
138
138
-
`workspace_role` (`WorkspaceRole` enum): New role. [See the roles options](../../manage/permissions/index.md#workspace-member-roles-overview).
139
+
`workspace_role` (string or `WorkspaceRole` enum): New role. [See the roles options](../../manage/permissions/index.md#workspace-member-roles-overview).
139
140
140
141
`reset_projects_roles` (Boolean, optional): If true, overridden project roles (explicitly shared projects access) will be reset. Default is `False`.
141
142
@@ -168,7 +169,7 @@ Arguments:
168
169
169
170
`email` (string): The email of an existing user.
170
171
171
-
`workspace_role` (`WorkspaceRole` enum): The user’s role in the workspace. [See the roles options](../../manage/permissions/index.md#workspace-member-roles-overview).
172
+
`workspace_role` (string or `WorkspaceRole` enum): The user’s role in the workspace. [See the roles options](../../manage/permissions/index.md#workspace-member-roles-overview).
172
173
173
174
---
174
175
@@ -184,12 +185,6 @@ The caller of the following methods must be a workspace admin, owner, project ow
184
185
185
186
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.
186
187
187
-
Some of the following methods require a `project_role` argument. This must be provided as a member of the `ProjectRole` enum.
188
-
To use the enum, import it from the `common.py` module:
189
-
190
-
```python
191
-
from mergin.common import ProjectRole
192
-
```
193
188
194
189
#### List project collaborators
195
190
@@ -206,6 +201,7 @@ Adds a user as project collaborator. This method is good for sharing projects wi
206
201
On Cloud, the user must be a in the workspace where the project belongs.
`user` (string): Email or username of the user to be added to the project.
216
212
217
-
`project_role`: (`ProjectRole` enum): Role of the user in the project. [See the roles options](../../manage/permissions/index.md#project-permissions-overview)
213
+
`project_role`: (string or `ProjectRole` enum): Role of the user in the project.
214
+
215
+
- String: Pass the role name directly (e.g., 'reader', 'editor', 'owner').
216
+
- Enum: Pass a member of the `ProjectRole` enum (requires importing from mergin.common)
217
+
-[See the roles options](../../manage/permissions/index.md#project-permissions-overview)
218
218
219
219
#### Update project collaborator role
220
220
@@ -227,7 +227,7 @@ Arguments:
227
227
228
228
`user_id` (int): ID of the user.
229
229
230
-
`project_role`: (`ProjectRole` enum): New role. [See the roles options](../../manage/permissions/index.md#project-permissions-overview)
230
+
`project_role`: (string or `ProjectRole` enum): New role. [See the roles options](../../manage/permissions/index.md#project-permissions-overview)
231
231
232
232
> 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.
0 commit comments