[#504] Use bktInfo in tree service to check owner

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
Denis Kirillov 2022-09-13 12:44:18 +03:00 committed by Alex Vanin
parent 67b01a30b5
commit 80beedf13e
12 changed files with 267 additions and 271 deletions

View file

@ -40,7 +40,7 @@ func (n *layer) PutBucketNotificationConfiguration(ctx context.Context, p *PutBu
return err
}
objIDToDelete, err := n.treeService.PutNotificationConfigurationNode(ctx, p.BktInfo.CID, objID)
objIDToDelete, err := n.treeService.PutNotificationConfigurationNode(ctx, p.BktInfo, objID)
objIDToDeleteNotFound := errorsStd.Is(err, ErrNoNodeToRemove)
if err != nil && !objIDToDeleteNotFound {
return err
@ -69,7 +69,7 @@ func (n *layer) GetBucketNotificationConfiguration(ctx context.Context, bktInfo
return conf, nil
}
objID, err := n.treeService.GetNotificationConfigurationNode(ctx, bktInfo.CID)
objID, err := n.treeService.GetNotificationConfigurationNode(ctx, bktInfo)
objIDNotFound := errorsStd.Is(err, ErrNodeNotFound)
if err != nil && !objIDNotFound {
return nil, err