forked from TrueCloudLab/frostfs-node
[#92] Provide session token to all produced requests
If object service produces new request, the should contain session token. This is the only way for node to grant access for a private container. Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
ace2362e74
commit
1332a6d3a8
4 changed files with 11 additions and 9 deletions
|
@ -5,6 +5,7 @@ import (
|
|||
|
||||
objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/core/object"
|
||||
objutil "github.com/nspcc-dev/neofs-node/pkg/services/object/util"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
|
@ -21,8 +22,8 @@ func NewRelationHeader(srch RelationSearcher, svc *Service) *RelationHeader {
|
|||
}
|
||||
}
|
||||
|
||||
func (h *RelationHeader) HeadRelation(ctx context.Context, addr *objectSDK.Address) (*object.Object, error) {
|
||||
id, err := h.srch.SearchRelation(ctx, addr)
|
||||
func (h *RelationHeader) HeadRelation(ctx context.Context, addr *objectSDK.Address, prm *objutil.CommonPrm) (*object.Object, error) {
|
||||
id, err := h.srch.SearchRelation(ctx, addr, prm)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "(%T) could not find relation", h)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue