forked from TrueCloudLab/frostfs-node
[#505] morph/container: Add key argument to client wrapper's SetEACL
In recent changes argument list of set eACL call of Container contract client was extended with binary public key. In the future there will be a need to pass the table in binary format. Replace `PutEACL` method with `PutEACLBinary` one which accepts three binary parameters: eACL table, key and signature. Create `PutEACL` function similar to the removed method, but accepting `Signature` structure instead of just a signature. Use this function in Container service server in the place where `PutEACL` was used. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
02079a4f89
commit
395fd187ac
2 changed files with 24 additions and 10 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/pkg"
|
||||
eaclSDK "github.com/nspcc-dev/neofs-api-go/pkg/acl/eacl"
|
||||
containerSDK "github.com/nspcc-dev/neofs-api-go/pkg/container"
|
||||
"github.com/nspcc-dev/neofs-api-go/pkg/owner"
|
||||
|
@ -88,8 +89,9 @@ func (s *morphExecutor) List(ctx context.Context, body *container.ListRequestBod
|
|||
|
||||
func (s *morphExecutor) SetExtendedACL(ctx context.Context, body *container.SetExtendedACLRequestBody) (*container.SetExtendedACLResponseBody, error) {
|
||||
table := eaclSDK.NewTableFromV2(body.GetEACL())
|
||||
sign := pkg.NewSignatureFromV2(body.GetSignature())
|
||||
|
||||
err := s.wrapper.PutEACL(table, body.GetSignature().GetSign())
|
||||
err := wrapper.PutEACL(s.wrapper, table, sign)
|
||||
|
||||
return new(container.SetExtendedACLResponseBody), err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue