forked from TrueCloudLab/frostfs-node
[#338] ir: Drop container notaryless code
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
03ab0ca30f
commit
fb708b3a2d
5 changed files with 66 additions and 121 deletions
|
@ -75,23 +75,7 @@ func (cp *Processor) checkSetEACL(e containerEvent.SetEACL) error {
|
|||
}
|
||||
|
||||
func (cp *Processor) approveSetEACL(e containerEvent.SetEACL) {
|
||||
var err error
|
||||
|
||||
prm := cntClient.PutEACLPrm{}
|
||||
|
||||
prm.SetTable(e.Table())
|
||||
prm.SetKey(e.PublicKey())
|
||||
prm.SetSignature(e.Signature())
|
||||
prm.SetToken(e.SessionToken())
|
||||
|
||||
if nr := e.NotaryRequest(); nr != nil {
|
||||
// setEACL event was received via Notary service
|
||||
err = cp.cnrClient.Morph().NotarySignAndInvokeTX(nr.MainTransaction)
|
||||
} else {
|
||||
// setEACL event was received via notification service
|
||||
err = cp.cnrClient.PutEACL(prm)
|
||||
}
|
||||
if err != nil {
|
||||
if err := cp.morphClient.NotarySignAndInvokeTX(e.NotaryRequest().MainTransaction); err != nil {
|
||||
cp.log.Error(logs.ContainerCouldNotApproveSetEACL,
|
||||
zap.String("error", err.Error()),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue