forked from TrueCloudLab/frostfs-node
[#1572] ape: Make ChainRouterError
constructor public
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
parent
e1c6b68967
commit
6b2bce21d1
2 changed files with 2 additions and 2 deletions
|
@ -104,7 +104,7 @@ func (c *checkerCoreImpl) CheckAPE(ctx context.Context, prm CheckPrm) error {
|
|||
if found && status == apechain.Allow {
|
||||
return nil
|
||||
}
|
||||
return newChainRouterError(rt, prm.Request, status)
|
||||
return NewChainRouterError(rt, prm.Request, status)
|
||||
}
|
||||
|
||||
// isValidBearer checks whether bearer token was correctly signed by authorized
|
||||
|
|
|
@ -21,7 +21,7 @@ func (e *ChainRouterError) Error() string {
|
|||
return fmt.Sprintf("access to operation %s is denied by access policy engine: %s", e.request.Operation(), e.status)
|
||||
}
|
||||
|
||||
func newChainRouterError(target policyengine.RequestTarget, request aperequest.Request, status apechain.Status) *ChainRouterError {
|
||||
func NewChainRouterError(target policyengine.RequestTarget, request aperequest.Request, status apechain.Status) *ChainRouterError {
|
||||
return &ChainRouterError{
|
||||
target: target,
|
||||
request: request,
|
||||
|
|
Loading…
Add table
Reference in a new issue