Skip to content

feat: remove site wide perms from creating a workspace #17296

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 9 commits into from
Apr 9, 2025

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented Apr 8, 2025

Creating a workspace required read on site wide user.
Only organization permissions should be required.

Added unit tests to assert this

Permissions required to create a workspace for another user. We might want to revist the required permissions at some point.

OrganizationPermissions: codersdk.CreatePermissions(map[codersdk.RBACResource][]codersdk.RBACAction{
codersdk.ResourceWorkspace: {codersdk.ActionCreate, codersdk.ActionWorkspaceStart, codersdk.ActionUpdate, codersdk.ActionRead},
codersdk.ResourceOrganizationMember: {codersdk.ActionRead},
}),

Emyrk added 2 commits April 8, 2025 10:07
Creating a workspace requires `read` on site wide `user`.
Added unit tests to assert this
@Emyrk Emyrk requested a review from aslilac April 8, 2025 18:07
@Emyrk Emyrk merged commit 0b58798 into main Apr 9, 2025
34 checks passed
@Emyrk Emyrk deleted the stevenmasley/workspace_authz_story branch April 9, 2025 19:35
@github-actions github-actions bot locked and limited conversation to collaborators Apr 9, 2025
@stirby
Copy link
Collaborator

stirby commented Apr 10, 2025

/cherry-pick release/2.21

@matifali
Copy link
Member

/cherry-pick release/2.20

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.

4 participants