mirror of
https://github.com/coder/coder.git
synced 2025-07-08 11:39:50 +00:00
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.
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user