From 37f0cde78def96e220fb069751d951dd07810086 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Wed, 16 Feb 2022 23:11:49 +0300 Subject: [PATCH] [#131] client: Remove `SetEACLPrm.SetSessionToken` From now session token for `SetEACL` operation should be written into eACL table structure (similar to `PutContainer`). Signed-off-by: Leonard Lyubich --- client/container.go | 5 +---- pool/pool.go | 4 ---- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/client/container.go b/client/container.go index 98b183fb..a8f826fd 100644 --- a/client/container.go +++ b/client/container.go @@ -549,8 +549,6 @@ func (c *Client) EACL(ctx context.Context, prm EACLPrm) (*EACLRes, error) { // SetEACLPrm groups parameters of SetEACL operation. type SetEACLPrm struct { - prmSession - tableSet bool table eacl.Table } @@ -613,8 +611,7 @@ func (c *Client) SetEACL(ctx context.Context, prm SetEACLPrm) (*SetEACLRes, erro // form meta header var meta v2session.RequestMetaHeader - - prm.prmSession.writeToMetaHeader(&meta) + meta.SetSessionToken(prm.table.SessionToken().ToV2()) // form request var req v2container.SetExtendedACLRequest diff --git a/pool/pool.go b/pool/pool.go index 1bd28cd3..1c8cf366 100644 --- a/pool/pool.go +++ b/pool/pool.go @@ -1207,10 +1207,6 @@ func (p *pool) SetEACL(ctx context.Context, table *eacl.Table, opts ...CallOptio cliPrm.SetTable(*table) } - if cfg.stoken != nil { - cliPrm.SetSessionToken(*cfg.stoken) - } - _, err = cp.client.SetEACL(ctx, cliPrm) if p.checkSessionTokenErr(err, cp.address) && !cfg.isRetry {