forked from TrueCloudLab/frostfs-node
[#525] ir/container: Fix checks without session token
In previous implementation verification of `SetEACL` events failed on events without session token. It was caused by redundant tries to verify `nil` session token. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
e67fe80132
commit
b73c0c67a2
1 changed files with 3 additions and 1 deletions
|
@ -67,10 +67,12 @@ func (cp *Processor) checkSetEACL(e container.SetEACL) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cnr.SetSessionToken(tok)
|
||||||
|
|
||||||
// TODO: check verb and container ID
|
// TODO: check verb and container ID
|
||||||
|
|
||||||
// check key ownership
|
// check key ownership
|
||||||
return cp.checkKeyOwnershipWithToken(cnr, key, tok)
|
return cp.checkKeyOwnership(cnr, key)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cp *Processor) approveSetEACL(e container.SetEACL) {
|
func (cp *Processor) approveSetEACL(e container.SetEACL) {
|
||||||
|
|
Loading…
Reference in a new issue