We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentfa2f704 commit9bf3298Copy full SHA for 9bf3298
coderd/database/dbauthz/dbauthz.go
@@ -583,7 +583,10 @@ func (q *querier) authorizeUpdateFileTemplate(ctx context.Context, file database
583
}
584
585
// convertToOrganizationRoles converts a set of scoped role names to their unique
586
-// scoped names.
+// scoped names. The database stores roles as an array of strings, and needs to be
587
+// converted.
588
+// TODO: Maybe make `[]rbac.RoleIdentifier` a custom type that implements a sql scanner
589
+// to remove the need for these converters?
590
func (*querier)convertToOrganizationRoles(organizationID uuid.UUID,names []string) ([]rbac.RoleIdentifier,error) {
591
uniques:=make([]rbac.RoleIdentifier,0,len(names))
592
for_,name:=rangenames {