Skip to content

Commit 0f17d7c

Browse files
authored
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.
1 parent 875cae1 commit 0f17d7c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

coderd/rbac/authz.go

+1
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ func (a RegoAuthorizer) Prepare(ctx context.Context, subject Subject, action Act
395395

396396
prepared, err := a.newPartialAuthorizer(ctx, subject, action, objectType)
397397
if err != nil {
398+
err = correctCancelError(err)
398399
return nil, xerrors.Errorf("new partial authorizer: %w", err)
399400
}
400401

0 commit comments

Comments
 (0)