[#1157] tree: Make tree service use Bearer token's APE overrides

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
Airat Arifullin 2024-05-29 11:18:31 +03:00 committed by Evgenii Stratonikov
parent 04a3f891fd
commit 239323eeef
4 changed files with 118 additions and 13 deletions

View file

@ -84,7 +84,7 @@ func (s *Service) verifyClient(ctx context.Context, req message, cid cidSDK.ID,
// FIXME(@aarifullin): tree service temporiraly performs APE checks on
// object verbs, because tree verbs have not been introduced yet.
if basicACL == 0x0 {
return s.checkAPE(ctx, cnr, cid, op, role, pubKey)
return s.checkAPE(ctx, bt, cnr, cid, op, role, pubKey)
}
if !basicACL.IsOpAllowed(op, role) {