Skip to content

Commit 9bf3298

Browse files
committed
add comment
1 parent fa2f704 commit 9bf3298

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

coderd/database/dbauthz/dbauthz.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,10 @@ func (q *querier) authorizeUpdateFileTemplate(ctx context.Context, file database
583583
}
584584

585585
// convertToOrganizationRoles converts a set of scoped role names to their unique
586-
// scoped names.
586+
// 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?
587590
func (*querier) convertToOrganizationRoles(organizationID uuid.UUID, names []string) ([]rbac.RoleIdentifier, error) {
588591
uniques := make([]rbac.RoleIdentifier, 0, len(names))
589592
for _, name := range names {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy