forked from TrueCloudLab/frostfs-sdk-go
[#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 <leonard@nspcc.ru>
This commit is contained in:
parent
a0cbc3d8be
commit
37f0cde78d
2 changed files with 1 additions and 8 deletions
|
@ -549,8 +549,6 @@ func (c *Client) EACL(ctx context.Context, prm EACLPrm) (*EACLRes, error) {
|
||||||
|
|
||||||
// SetEACLPrm groups parameters of SetEACL operation.
|
// SetEACLPrm groups parameters of SetEACL operation.
|
||||||
type SetEACLPrm struct {
|
type SetEACLPrm struct {
|
||||||
prmSession
|
|
||||||
|
|
||||||
tableSet bool
|
tableSet bool
|
||||||
table eacl.Table
|
table eacl.Table
|
||||||
}
|
}
|
||||||
|
@ -613,8 +611,7 @@ func (c *Client) SetEACL(ctx context.Context, prm SetEACLPrm) (*SetEACLRes, erro
|
||||||
|
|
||||||
// form meta header
|
// form meta header
|
||||||
var meta v2session.RequestMetaHeader
|
var meta v2session.RequestMetaHeader
|
||||||
|
meta.SetSessionToken(prm.table.SessionToken().ToV2())
|
||||||
prm.prmSession.writeToMetaHeader(&meta)
|
|
||||||
|
|
||||||
// form request
|
// form request
|
||||||
var req v2container.SetExtendedACLRequest
|
var req v2container.SetExtendedACLRequest
|
||||||
|
|
|
@ -1207,10 +1207,6 @@ func (p *pool) SetEACL(ctx context.Context, table *eacl.Table, opts ...CallOptio
|
||||||
cliPrm.SetTable(*table)
|
cliPrm.SetTable(*table)
|
||||||
}
|
}
|
||||||
|
|
||||||
if cfg.stoken != nil {
|
|
||||||
cliPrm.SetSessionToken(*cfg.stoken)
|
|
||||||
}
|
|
||||||
|
|
||||||
_, err = cp.client.SetEACL(ctx, cliPrm)
|
_, err = cp.client.SetEACL(ctx, cliPrm)
|
||||||
|
|
||||||
if p.checkSessionTokenErr(err, cp.address) && !cfg.isRetry {
|
if p.checkSessionTokenErr(err, cp.address) && !cfg.isRetry {
|
||||||
|
|
Loading…
Reference in a new issue