From 0f17d7c1440c877dd951c4af22a2ea978e150a45 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Fri, 17 Nov 2023 14:28:59 -0600 Subject: [PATCH] chore: return context.Canceled when in Prepare for rbac (#10763) Was returning a custom rego canceled error. This conforms with how Authorize handles this error. --- coderd/rbac/authz.go | 1 + 1 file changed, 1 insertion(+) diff --git a/coderd/rbac/authz.go b/coderd/rbac/authz.go index 42625b07c3..f97f593d20 100644 --- a/coderd/rbac/authz.go +++ b/coderd/rbac/authz.go @@ -395,6 +395,7 @@ func (a RegoAuthorizer) Prepare(ctx context.Context, subject Subject, action Act prepared, err := a.newPartialAuthorizer(ctx, subject, action, objectType) if err != nil { + err = correctCancelError(err) return nil, xerrors.Errorf("new partial authorizer: %w", err) }