mirror of https://github.com/coder/coder.git
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:
parent
875cae1fc9
commit
0f17d7c144
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue