fix: remove overzealous access check rendering invoice download impossible

This commit is contained in:
Björn Fromme
2025-04-28 11:21:29 +02:00
parent c37309b3c1
commit b56078ae58
@@ -16,7 +16,6 @@ use Symfony\Component\HttpFoundation\StreamedResponse;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
use Symfony\Contracts\Cache\CacheInterface;
use function Symfony\Component\String\u;
class DownloadController extends AbstractController
@@ -62,17 +61,6 @@ class DownloadController extends AbstractController
'booking_id' => $id,
]);
// Fetch booking data via API and cache result for a short ttl to check permissions
$bookingData = $this->fetchBookingData($email, $password, $id);
if (null === $bookingData || $bookingData instanceof Notification) {
$this->addFlash('error', 'Buchungsdaten nicht (mehr) verfügbar');
return $this->redirectToRoute('app_bookings');
}
$this->denyAccessUnlessGranted('VIEW', $bookingData);
try {
$file = $this
->apiClient