diff --git a/pkg/services/tree/signature.go b/pkg/services/tree/signature.go index b932f6de6..7a466955c 100644 --- a/pkg/services/tree/signature.go +++ b/pkg/services/tree/signature.go @@ -84,7 +84,7 @@ func (s *Service) verifyClient(req message, cid cidSDK.ID, rawBearer []byte, op return nil } - var tableFromBearer bool + var useBearer bool if len(rawBearer) != 0 { if !basicACL.AllowedBearerRules(op) { s.log.Debug(logs.TreeBearerPresentedButNotAllowedByACL, @@ -92,13 +92,13 @@ func (s *Service) verifyClient(req message, cid cidSDK.ID, rawBearer []byte, op zap.String("op", op.String()), ) } else { - tableFromBearer = true + useBearer = true } } var tb eacl.Table signer := req.GetSignature().GetKey() - if tableFromBearer && !bt.Impersonate() { + if useBearer && !bt.Impersonate() { if !bearer.ResolveIssuer(*bt).Equals(cnr.Value.Owner()) { return eACLErr(eaclOp, errBearerWrongOwner) } @@ -110,7 +110,7 @@ func (s *Service) verifyClient(req message, cid cidSDK.ID, rawBearer []byte, op } tb = *tbCore.Value - if tableFromBearer && bt.Impersonate() { + if useBearer && bt.Impersonate() { signer = bt.SigningKeyBytes() } }