Skip to content

feat: provide endpoint to lock/unlock workspace #8239

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

Merged
merged 2 commits into from
Jun 28, 2023
Merged

feat: provide endpoint to lock/unlock workspace #8239

merged 2 commits into from
Jun 28, 2023

Conversation

sreya
Copy link
Collaborator

@sreya sreya commented Jun 28, 2023

This PR adds an endpoint for locking/unlocking a workspace. For the sake of simplicity the current implementation allows a user to unlock their own workspace. This work is done in anticipation of #8172.
fixes #8171

@sreya sreya marked this pull request as ready for review June 28, 2023 03:57
@sreya sreya requested a review from Emyrk June 28, 2023 03:57
Copy link
Member

@Emyrk Emyrk left a comment

Choose a reason for hiding this comment

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

This is as discussed.

The RBAC enforcement is nice, I think we just need to add read access to locked workspaces where appropriate.

One open question is now that we have the idea of a WorksapceBuildResource, we might want to attach things like build logs to that??

@sreya
Copy link
Collaborator Author

sreya commented Jun 28, 2023

One open question is now that we have the idea of a WorksapceBuildResource, we might want to attach things like build logs to that??

Yeah and things like ProvisionerJobs, etc. I saw TODOs above some of the queries and figured I'd try to touch as little as possibe.

@Emyrk
Copy link
Member

Emyrk commented Jun 28, 2023

One open question is now that we have the idea of a WorksapceBuildResource, we might want to attach things like build logs to that??

Yeah and things like ProvisionerJobs, etc. I saw TODOs above some of the queries and figured I'd try to touch as little as possibe.

Fair for this PR

Copy link
Member

@Emyrk Emyrk left a comment

Choose a reason for hiding this comment

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

The locked workspace only affects builds, not the actual workspace. So you keep your read on the workspace 👍

@sreya sreya merged commit 749307e into main Jun 28, 2023
@sreya sreya deleted the jon/lockws branch June 28, 2023 21:12
@github-actions github-actions bot locked and limited conversation to collaborators Jun 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

workspace actions: create endpoint to lock/unlock workspace
2 participants