From d6439369abee695615e5657a3c23cad69c5775e0 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Wed, 25 Aug 2021 14:26:41 +0300 Subject: [PATCH] [#768] object/acl: Support all eACL filter fields from the spec Signed-off-by: Alex Vanin --- pkg/services/object/acl/eacl/v2/object.go | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/pkg/services/object/acl/eacl/v2/object.go b/pkg/services/object/acl/eacl/v2/object.go index e382692194..0dd30f38a0 100644 --- a/pkg/services/object/acl/eacl/v2/object.go +++ b/pkg/services/object/acl/eacl/v2/object.go @@ -62,7 +62,26 @@ func headersFromObject(obj *object.Object, addr *objectSDK.Address) []eacl.Heade v: u64Value(obj.PayloadSize()), }, oidHeader(addr.ObjectID()), - // TODO: add others fields after neofs-api#84 + // object version + &sysObjHdr{ + k: acl.FilterObjectVersion, + v: obj.Version().String(), + }, + // payload hash + &sysObjHdr{ + k: acl.FilterObjectPayloadHash, + v: obj.PayloadChecksum().String(), + }, + // object type + &sysObjHdr{ + k: acl.FilterObjectType, + v: obj.Type().String(), + }, + // payload homomorphic hash + &sysObjHdr{ + k: acl.FilterObjectHomomorphicHash, + v: obj.PayloadHomomorphicHash().String(), + }, ) attrs := obj.Attributes()