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

Struct Subject

coderd/rbac/authz.go:96–118  ·  view source on GitHub ↗

Subject is a struct that contains all the elements of a subject in an rbac authorize.

Source from the content-addressed store, hash-verified

94// Subject is a struct that contains all the elements of a subject in an rbac
95// authorize.
96type Subject struct {
97 // FriendlyName is entirely optional and is used for logging and debugging
98 // It is not used in any functional way.
99 // It is usually the "username" of the user, but it can be the name of the
100 // external workspace proxy or other service type actor.
101 FriendlyName string
102
103 // Email is entirely optional and is used for logging and debugging
104 // It is not used in any functional way.
105 Email string
106
107 // Type indicates what kind of subject this is (user, system, provisioner, etc.)
108 // It is not used in any functional way, only for logging.
109 Type SubjectType
110
111 ID string
112 Roles ExpandableRoles
113 Groups []string
114 Scope ExpandableScope
115
116 // cachedASTValue is the cached ast value for this subject.
117 cachedASTValue ast.Value
118}
119
120// RegoValueOk is only used for unit testing. There is no easy way
121// to get the error for the unexported method, and this is intentional.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected