From b48a4ede02c30935ed4b7f19e5d8d0fb8e19defd Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Thu, 29 Oct 2020 18:01:58 +0300 Subject: [PATCH] [#125] services/eacl: Use latest object header keys Signed-off-by: Leonard Lyubich --- pkg/services/object/acl/eacl/v2/object.go | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/pkg/services/object/acl/eacl/v2/object.go b/pkg/services/object/acl/eacl/v2/object.go index 55f775ae1..2b824b4a2 100644 --- a/pkg/services/object/acl/eacl/v2/object.go +++ b/pkg/services/object/acl/eacl/v2/object.go @@ -6,6 +6,7 @@ import ( "github.com/nspcc-dev/neofs-api-go/pkg/container" objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object" "github.com/nspcc-dev/neofs-api-go/pkg/owner" + "github.com/nspcc-dev/neofs-api-go/v2/acl" "github.com/nspcc-dev/neofs-node/pkg/core/object" "github.com/nspcc-dev/neofs-node/pkg/services/object/acl/eacl" ) @@ -44,31 +45,27 @@ func headersFromObject(obj *object.Object) []eacl.Header { for ; obj != nil; obj = obj.GetParent() { res = append(res, - // object ID - &sysObjHdr{ - k: objectSDK.HdrSysNameID, - v: idValue(obj.GetID()), - }, // container ID &sysObjHdr{ - k: objectSDK.HdrSysNameCID, + k: acl.FilterObjectContainerID, v: cidValue(obj.GetContainerID()), }, // owner ID &sysObjHdr{ - k: objectSDK.HdrSysNameOwnerID, + k: acl.FilterObjectOwnerID, v: ownerIDValue(obj.GetOwnerID()), }, // creation epoch &sysObjHdr{ - k: objectSDK.HdrSysNameCreatedEpoch, + k: acl.FilterObjectCreationEpoch, v: u64Value(obj.GetCreationEpoch()), }, // payload size &sysObjHdr{ - k: objectSDK.HdrSysNamePayloadLength, + k: acl.FilterObjectPayloadLength, v: u64Value(obj.GetPayloadSize()), }, + // TODO: add others fields after neofs-api#84 ) attrs := obj.GetAttributes()