Skip to content

Commit 0df4d96

Browse files
committed
chore: remove read all provisioners from users
Reading provisioner daemons now extends from org member, not site wide member.
1 parent 86a82b5 commit 0df4d96

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

coderd/rbac/roles.go

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,6 @@ func ReloadBuiltinRoles(opts *RoleOptions) {
274274
DisplayName: "Member",
275275
Site: Permissions(map[string][]policy.Action{
276276
ResourceAssignRole.Type: {policy.ActionRead},
277-
// All users can see the provisioner daemons.
278-
ResourceProvisionerDaemon.Type: {policy.ActionRead},
279277
// All users can see OAuth2 provider applications.
280278
ResourceOauth2App.Type: {policy.ActionRead},
281279
ResourceWorkspaceProxy.Type: {policy.ActionRead},
@@ -414,18 +412,15 @@ func ReloadBuiltinRoles(opts *RoleOptions) {
414412
DisplayName: "",
415413
Site: []Permission{},
416414
Org: map[string][]Permission{
417-
organizationID.String(): {
418-
{
419-
// All org members can read the organization
420-
ResourceType: ResourceOrganization.Type,
421-
Action: policy.ActionRead,
422-
},
423-
{
424-
// Can read available roles.
425-
ResourceType: ResourceAssignOrgRole.Type,
426-
Action: policy.ActionRead,
427-
},
428-
},
415+
organizationID.String(): Permissions(map[string][]policy.Action{
416+
// All users can see the provisioner daemons for workspace
417+
// creation.
418+
ResourceProvisionerDaemon.Type: {policy.ActionRead},
419+
// All org members can read the organization
420+
ResourceOrganization.Type: {policy.ActionRead},
421+
// Can read available roles.
422+
ResourceAssignOrgRole.Type: {policy.ActionRead},
423+
}),
429424
},
430425
User: []Permission{
431426
{

0 commit comments

Comments
 (0)