Skip to content

Commit b3cd5f1

Browse files
committed
add groups to dbauthz role
1 parent 80cfdc8 commit b3cd5f1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

coderd/database/dbauthz/dbauthz.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ var (
174174
// When org scoped provisioner credentials are implemented,
175175
// this can be reduced to read a specific org.
176176
rbac.ResourceOrganization.Type: {rbac.ActionRead},
177+
rbac.ResourceGroup.Type: {rbac.ActionRead},
177178
}),
178179
Org: map[string][]rbac.Permission{},
179180
User: []rbac.Permission{},

coderd/provisionerdserver/provisionerdserver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ func (s *server) acquireProtoJob(ctx context.Context, job database.ProvisionerJo
467467
if err != nil {
468468
return nil, failJob(fmt.Sprintf("get owner: %s", err))
469469
}
470-
orgGroups, err := s.Database.GetGroupsByOrganizationID(ctx, workspace.OrganizationID)
470+
orgGroups, err := s.Database.GetGroupsByOrganizationID(ctx, s.OrganizationID)
471471
if err != nil {
472472
return nil, failJob(fmt.Sprintf("get owner groups: %s", err))
473473
}

0 commit comments

Comments
 (0)