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

Method ScopeSet

coderd/database/modelmethods.go:356–361  ·  view source on GitHub ↗

ScopeSet returns the scopes combined with the database allow list. It is the canonical way to expose an API key's effective scope for authorization.

()

Source from the content-addressed store, hash-verified

354// ScopeSet returns the scopes combined with the database allow list. It is the
355// canonical way to expose an API key's effective scope for authorization.
356func (k APIKey) ScopeSet() APIKeyScopeSet {
357 return APIKeyScopeSet{
358 Scopes: k.Scopes,
359 AllowList: k.AllowList,
360 }
361}
362
363func (k APIKey) RBACObject() rbac.Object {
364 return rbac.ResourceApiKey.WithIDString(k.ID).

Callers 3

TestAPIKeyScopesExpandFunction · 0.95
ValidateAPIKeyFunction · 0.80
AssertRBACFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestAPIKeyScopesExpandFunction · 0.76