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)
| 805 | // more specific As* helper above (or adding a new, narrowly-scoped one) so |
| 806 | // that permissions remain limited to the operation you need. |
| 807 | func 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). |