Skip to content

chore: remove read all provisioners from users #14801

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 3 commits into from
Sep 25, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
chore: remove read all provisioners from users
Reading provisioner daemons now extends from org member,
not site wide member.
  • Loading branch information
Emyrk committed Sep 25, 2024
commit 0df4d96ff6f167de4fd583c565e9d85be2b752be
23 changes: 9 additions & 14 deletions coderd/rbac/roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,6 @@ func ReloadBuiltinRoles(opts *RoleOptions) {
DisplayName: "Member",
Site: Permissions(map[string][]policy.Action{
ResourceAssignRole.Type: {policy.ActionRead},
// All users can see the provisioner daemons.
ResourceProvisionerDaemon.Type: {policy.ActionRead},
// All users can see OAuth2 provider applications.
ResourceOauth2App.Type: {policy.ActionRead},
ResourceWorkspaceProxy.Type: {policy.ActionRead},
Expand Down Expand Up @@ -414,18 +412,15 @@ func ReloadBuiltinRoles(opts *RoleOptions) {
DisplayName: "",
Site: []Permission{},
Org: map[string][]Permission{
organizationID.String(): {
{
// All org members can read the organization
ResourceType: ResourceOrganization.Type,
Action: policy.ActionRead,
},
{
// Can read available roles.
ResourceType: ResourceAssignOrgRole.Type,
Action: policy.ActionRead,
},
},
organizationID.String(): Permissions(map[string][]policy.Action{
// All users can see the provisioner daemons for workspace
// creation.
ResourceProvisionerDaemon.Type: {policy.ActionRead},
// All org members can read the organization
ResourceOrganization.Type: {policy.ActionRead},
// Can read available roles.
ResourceAssignOrgRole.Type: {policy.ActionRead},
}),
},
User: []Permission{
{
Expand Down
Loading