Skip to content

Commit

Permalink
small fix when transferring ownership
Browse files Browse the repository at this point in the history
  • Loading branch information
shayanaijaz committed Dec 8, 2023
1 parent afed181 commit b2886ea
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,12 @@ def transfer_ownership(client, workspace_id: str, new_owner: str, old_owner: str
"""
service_client = service_account()
system_id = f"{settings.PORTAL_PROJECTS_SYSTEM_PREFIX}.{workspace_id}"

# Add permissions for current owner to prevent removal from project after transferring ownership
set_workspace_acls(service_client,
settings.PORTAL_PROJECTS_ROOT_SYSTEM_NAME,
workspace_id,
new_owner,
old_owner,
"add",
"writer")

Expand Down

0 comments on commit b2886ea

Please sign in to comment.