Skip to content

fix: ensure /workspaces functions correctly even if missing template permissions #9152

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 1 commit into from
Aug 17, 2023

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented Aug 17, 2023

Closes #9141

If a user is missing template perms to a workspace, just block reading that workspace. This is to keep the api consistent, it is not a rbac enforcement.

This should ublock users reporting this bug that /workspaces returns nothing when 1 workspace cannot be fully read. We might want to be able to return missing or unknown fields in our api to account for this.


This decision can change in the future, but today it was causing panics in the single workspace case, and an api error in the list case.

If a user is missing template perms to a workspace, just block reading
that workspace. This is to keep the api consistent, it is not a rbac
enforcement.

This should ublock users reporting this bug that /workspaces returns
nothing when 1 workspace cannot be fully read. We might want to be
able to return missing or unknown fields in our api to account
for this.
@Emyrk Emyrk requested a review from sreya August 17, 2023 14:58
@Emyrk Emyrk changed the title fix: /workspaces should work even if missing template perms fix: ensure /workspaces functions correctly even if missing template permissions Aug 17, 2023
Copy link
Collaborator

@sreya sreya left a comment

Choose a reason for hiding this comment

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

Nice

@Emyrk Emyrk merged commit 8910f05 into main Aug 17, 2023
@Emyrk Emyrk deleted the stevenmasley/workspace_perms branch August 17, 2023 18:22
@github-actions github-actions bot locked and limited conversation to collaborators Aug 17, 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.

User cannot access workspace list if they are removed from one or more template
2 participants