[#510] treesvc: Rename tableFromBearer
to useBearer
All checks were successful
ci/woodpecker/push/pre-commit Pipeline was successful
All checks were successful
ci/woodpecker/push/pre-commit Pipeline was successful
With impersonation, the old name is no longer descriptive. Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
b8bcfac531
commit
8a9fc2c372
1 changed files with 4 additions and 4 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue