Skip to content

Commit 585e82a

Browse files
committed
revert - permission is not role
1 parent 8385e14 commit 585e82a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

server/mergin/sync/public_api_v2_controller.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,12 +428,12 @@ def list_workspace_projects(workspace_id, page, per_page, order_params=None, q=N
428428
if not (ws and ws.is_active):
429429
abort(404, "Workspace not found")
430430

431-
if ws.user_has_permissions(current_user, WorkspaceRole.READER.value):
431+
if ws.user_has_permissions(current_user, "read"):
432432
# regular members can list all projects
433433
projects = Project.query.filter_by(workspace_id=ws.id).filter(
434434
Project.removed_at.is_(None)
435435
)
436-
elif ws.user_has_permissions(current_user, WorkspaceRole.GUEST.value):
436+
elif ws.user_has_permissions(current_user, "guest"):
437437
# guest can list only explicitly shared projects
438438
projects = projects_query(
439439
ProjectPermissions.Read, as_admin=False, public=False

0 commit comments

Comments
 (0)