MCPcopy Index your code
hub / github.com/coder/coder / RoleNames

Method RoleNames

coderd/database/modelmethods.go:836–846  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

834}
835
836func (r GetAuthorizationUserRolesRow) RoleNames() ([]rbac.RoleIdentifier, error) {
837 names := make([]rbac.RoleIdentifier, 0, len(r.Roles))
838 for _, role := range r.Roles {
839 value, err := rbac.RoleNameFromString(role)
840 if err != nil {
841 return nil, xerrors.Errorf("convert role %q: %w", role, err)
842 }
843 names = append(names, value)
844 }
845 return names, nil
846}
847
848func (k CryptoKey) ExpiresAt(keyDuration time.Duration) time.Time {
849 return k.StartsAt.Add(keyDuration).UTC()

Callers 5

UserRBACSubjectFunction · 0.80
TestRoleSyncTableFunction · 0.80
AssertRBACFunction · 0.80
acquireProtoJobMethod · 0.80
WorkspaceOwnerFunction · 0.80

Calls 2

RoleNameFromStringFunction · 0.92
ErrorfMethod · 0.45

Tested by 1

TestRoleSyncTableFunction · 0.64