diff --git a/applications/jupyterhub/src/osb_jupyter/osb_jupyter/jupyterhub.py b/applications/jupyterhub/src/osb_jupyter/osb_jupyter/jupyterhub.py index b7abc3d7..fa9e969a 100755 --- a/applications/jupyterhub/src/osb_jupyter/osb_jupyter/jupyterhub.py +++ b/applications/jupyterhub/src/osb_jupyter/osb_jupyter/jupyterhub.py @@ -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 @@ -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