Skip to content

Commit

Permalink
layer: Filter meta objects for tags
Browse files Browse the repository at this point in the history
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
  • Loading branch information
smallhive committed Mar 3, 2025
1 parent d44b718 commit 8fd51cc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/layer/layer.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/nspcc-dev/neofs-s3-gw/api/data"
"github.com/nspcc-dev/neofs-s3-gw/api/layer/encryption"
"github.com/nspcc-dev/neofs-s3-gw/api/s3errors"
"github.com/nspcc-dev/neofs-s3-gw/api/s3headers"
"github.com/nspcc-dev/neofs-s3-gw/creds/accessbox"
"github.com/nspcc-dev/neofs-sdk-go/bearer"
"github.com/nspcc-dev/neofs-sdk-go/client"
Expand Down Expand Up @@ -789,8 +790,11 @@ func (n *layer) GetIDForVersioningContainer(ctx context.Context, p *ShortInfoPar
opts.WithBearerToken(*bt)
}

// prm.Attributes[s3headers.MetaType] = s3headers.TypeTags

filters.AddFilter(object.AttributeFilePath, p.Object, object.MatchStringEqual)
filters.AddTypeFilter(object.MatchStringEqual, object.TypeRegular)
filters.AddFilter(s3headers.MetaType, "", object.MatchNotPresent)

if !p.FindNullVersion {
filters.AddFilter(attrS3VersioningState, data.VersioningEnabled, object.MatchStringEqual)
Expand Down

0 comments on commit 8fd51cc

Please sign in to comment.