Skip to content

Commit

Permalink
Fix issue with usernames in spawn
Browse files Browse the repository at this point in the history
  • Loading branch information
filippomc committed Mar 27, 2023
1 parent d3d4c76 commit 3adcc3a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def workspace_volume_is_legacy(workspace_id):
# Add labels to use for affinity
labels = {
'workspace': str(workspace_id),
'user': self.user.name
'user': "".join(c for c in self.user.name if c.isalnum())
}

self.common_labels = labels
Expand Down Expand Up @@ -110,7 +110,8 @@ def has_user_write_access(workspace, user: User):
print('Checking access, name:', user.name, "workspace:", workspace["id"])


workspace_owner = workspace["user"]["username"]
workspace_owner = workspace["user"]["id"]
print("Workspace owner", workspace_owner, "-", workspace["user"]["username"])

if workspace_owner == user.name:
return True
Expand Down

0 comments on commit 3adcc3a

Please sign in to comment.