Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix(Workspaces): ensure the presence of a token / server hash in memberships #552

Merged
merged 3 commits into from
Sep 25, 2023

Conversation

pvanliefland
Copy link
Contributor

Changes

  • Make sure that access_token (and notebooks_server_hash while we're at it) cannot be blank nor null in WorkspaceMembership
  • Removes generate_token method - handle everythin in save() (that's what we were already doing for notebook server hash)
  • Added an RunPython on he added migration that calls save() on every membership record without token so that it gets a token

How/what to test

Create a workspace, check in the admin that it has a token and a notebook server hash.

Copy link
Contributor Author

@pvanliefland pvanliefland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: let's put back the blank=True option, and add an admin action for regenerating the access token

@pvanliefland
Copy link
Contributor Author

@qgerome I skipped the admin action for now, as we are likely to revamp this whole token thing soon. For now you just have to empty the token field in the admin and a new one will be generated

@qgerome qgerome merged commit 1f1c4da into main Sep 25, 2023
2 checks passed
@qgerome qgerome deleted the fix-memberships-tokens branch September 25, 2023 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants