Use the owner auth to get the path of shared resources

This fixes searching received shares that were not shared from the space
root.
This commit is contained in:
André Duffeck
2023-07-07 10:46:53 +02:00
parent ab056a23ca
commit b2f1e849fd

View File

@@ -246,7 +246,12 @@ func (s *Service) searchIndex(ctx context.Context, req *searchsvc.SearchRequest,
return nil, err
}
gpRes, err := gatewayClient.GetPath(ctx, &provider.GetPathRequest{
ownerCtx, err := getAuthContext(&user.User{Id: space.Owner.Id}, s.gatewaySelector, s.secret, s.logger)
if err != nil {
return nil, err
}
gpRes, err := gatewayClient.GetPath(ownerCtx, &provider.GetPathRequest{
ResourceId: space.Root,
})
if err != nil {