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

Function AsSystemRestricted

coderd/database/dbauthz/dbauthz.go:807–809  ·  view source on GitHub ↗

AsSystemRestricted returns a context with an actor that has permissions required for various system operations (login, logout, metrics cache). DO NOT USE THIS UNLESS YOU HAVE ABSOLUTELY NO OTHER CHOICE. Prefer using a more specific As* helper above (or adding a new, narrowly-scoped one) so that perm

(ctx context.Context)

Source from the content-addressed store, hash-verified

805// more specific As* helper above (or adding a new, narrowly-scoped one) so
806// that permissions remain limited to the operation you need.
807func AsSystemRestricted(ctx context.Context) context.Context {
808 return As(ctx, subjectSystemRestricted)
809}
810
811// AsSystemOAuth2 returns a context with an actor that has permissions
812// required for OAuth2 provider operations (token revocation, device codes, registration).

Calls 1

AsFunction · 0.85