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

Method Authorize

coderd/rbac/authz.go:838–843  ·  view source on GitHub ↗
(ctx context.Context, subject Subject, action policy.Action, object Object)

Source from the content-addressed store, hash-verified

836}
837
838func (c *authRecorder) Authorize(ctx context.Context, subject Subject, action policy.Action, object Object) error {
839 err := c.authz.Authorize(ctx, subject, action, object)
840 authorized := err == nil
841 recordAuthzCheck(ctx, action, object, authorized)
842 return err
843}
844
845func (c *authRecorder) Prepare(ctx context.Context, subject Subject, action policy.Action, objectType string) (PreparedAuthorized, error) {
846 return c.authz.Prepare(ctx, subject, action, objectType)

Callers

nothing calls this directly

Calls 2

recordAuthzCheckFunction · 0.85
AuthorizeMethod · 0.65

Tested by

no test coverage detected