From ad6b5aa8a9d3c96b5ab1696d3d468a2f122486a8 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Mon, 24 May 2021 21:49:40 +0300 Subject: [PATCH] [#283] client/container: Attach container session token to request Write session token of `container.Container` to container SetExtendedACL request body inside `client.SetEACL` call. Signed-off-by: Leonard Lyubich --- pkg/client/container.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/client/container.go b/pkg/client/container.go index f0888dfd..7e3a25e1 100644 --- a/pkg/client/container.go +++ b/pkg/client/container.go @@ -365,7 +365,11 @@ func (c *clientImpl) SetEACL(ctx context.Context, eacl *eacl.Table, opts ...Call req := new(v2container.SetExtendedACLRequest) req.SetBody(reqBody) - req.SetMetaHeader(v2MetaHeaderFromOpts(callOptions)) + + meta := v2MetaHeaderFromOpts(callOptions) + meta.SetSessionToken(eacl.SessionToken().ToV2()) + + req.SetMetaHeader(meta) err = v2signature.SignServiceMessage(callOptions.key, req) if err != nil {