Skip to content

Commit 554cb37

Browse files
committed
add groups to dbauthz role
1 parent fce7583 commit 554cb37

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
@@ -173,6 +173,7 @@ var (
173173
// When org scoped provisioner credentials are implemented,
174174
// this can be reduced to read a specific org.
175175
rbac.ResourceOrganization.Type: {rbac.ActionRead},
176+
rbac.ResourceGroup.Type: {rbac.ActionRead},
176177
}),
177178
Org: map[string][]rbac.Permission{},
178179
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)