Skip to content

Commit 45ab265

Browse files
authored
chore: add permissions to autobuilder & prebuilder to run wsbuild (#18527)
Read organization member and read files is now required for dynamic param building.
1 parent 403f1c3 commit 45ab265

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

coderd/database/dbauthz/dbauthz.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ var (
228228
Identifier: rbac.RoleIdentifier{Name: "autostart"},
229229
DisplayName: "Autostart Daemon",
230230
Site: rbac.Permissions(map[string][]policy.Action{
231+
rbac.ResourceOrganizationMember.Type: {policy.ActionRead},
232+
rbac.ResourceFile.Type: {policy.ActionRead}, // Required to read terraform files
231233
rbac.ResourceNotificationMessage.Type: {policy.ActionCreate, policy.ActionRead},
232234
rbac.ResourceSystem.Type: {policy.WildcardSymbol},
233235
rbac.ResourceTemplate.Type: {policy.ActionRead, policy.ActionUpdate},
@@ -443,6 +445,7 @@ var (
443445
},
444446
// Should be able to add the prebuilds system user as a member to any organization that needs prebuilds.
445447
rbac.ResourceOrganizationMember.Type: {
448+
policy.ActionRead,
446449
policy.ActionCreate,
447450
},
448451
// Needs to be able to assign roles to the system user in order to make it a member of an organization.
@@ -456,6 +459,10 @@ var (
456459
rbac.ResourceOrganization.Type: {
457460
policy.ActionRead,
458461
},
462+
// Required to read the terraform files of a template
463+
rbac.ResourceFile.Type: {
464+
policy.ActionRead,
465+
},
459466
}),
460467
},
461468
}),

0 commit comments

Comments
 (0)