[#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:
Leonard Lyubich 2021-05-28 15:31:00 +03:00 committed by Leonard Lyubich
parent e67fe80132
commit b73c0c67a2

View file

@ -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) {