diff --git a/pkg/morph/client/container/wrapper/eacl.go b/pkg/morph/client/container/wrapper/eacl.go index 6b0001ed7..84c817f5b 100644 --- a/pkg/morph/client/container/wrapper/eacl.go +++ b/pkg/morph/client/container/wrapper/eacl.go @@ -5,14 +5,14 @@ import ( "github.com/nspcc-dev/neofs-api-go/pkg" "github.com/nspcc-dev/neofs-api-go/pkg/acl/eacl" - containerSDK "github.com/nspcc-dev/neofs-api-go/pkg/container" + cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id" "github.com/nspcc-dev/neofs-node/pkg/core/container" client "github.com/nspcc-dev/neofs-node/pkg/morph/client/container" ) // GetEACL reads the extended ACL table from NeoFS system // through Container contract call. -func (w *Wrapper) GetEACL(cid *containerSDK.ID) (*eacl.Table, error) { +func (w *Wrapper) GetEACL(cid *cid.ID) (*eacl.Table, error) { if cid == nil { return nil, errNilArgument } @@ -60,7 +60,7 @@ func (w *Wrapper) GetEACL(cid *containerSDK.ID) (*eacl.Table, error) { // Returns error if table is nil. // // If TryNotary is provided, calls notary contract. -func PutEACL(w *Wrapper, table *eacl.Table, sig *pkg.Signature) error { +func PutEACL(w *Wrapper, table *eacl.Table) error { if table == nil { return errNilArgument } @@ -70,6 +70,8 @@ func PutEACL(w *Wrapper, table *eacl.Table, sig *pkg.Signature) error { return fmt.Errorf("can't marshal eacl table: %w", err) } + sig := table.Signature() + return w.PutEACL(data, sig.Key(), sig.Sign()) } diff --git a/pkg/services/container/morph/executor.go b/pkg/services/container/morph/executor.go index bda49b173..bf082ebad 100644 --- a/pkg/services/container/morph/executor.go +++ b/pkg/services/container/morph/executor.go @@ -96,7 +96,9 @@ func (s *morphExecutor) SetExtendedACL(ctx context.Context, body *container.SetE table := eaclSDK.NewTableFromV2(body.GetEACL()) sign := pkg.NewSignatureFromV2(body.GetSignature()) - err := wrapper.PutEACL(s.wrapper, table, sign) + table.SetSignature(sign) + + err := wrapper.PutEACL(s.wrapper, table) return new(container.SetExtendedACLResponseBody), err }