[#69] object/acl: Extended requestInfo structure

Add container identifier field. Add send public key field.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
support/v0.27
Leonard Lyubich 2020-10-03 10:40:50 +03:00 committed by Alex Vanin
parent 6c3c872ee4
commit a7782cf1f9
1 changed files with 10 additions and 0 deletions

View File

@ -43,6 +43,10 @@ type (
requestRole acl.Role
operation acl.Operation // put, get, head, etc.
owner *owner.ID // container owner
cid *container.ID
senderKey []byte
}
)
@ -351,6 +355,12 @@ func (b Service) findRequestInfo(
info.operation = verb
info.owner = owner.NewIDFromV2(cnr.GetOwnerID())
info.cid = cid
// it is assumed that at the moment the key will be valid,
// otherwise the request would not pass validation
info.senderKey = req.vheader.GetBodySignature().GetKey()
return info, nil
}