fix: remove overzealous access check rendering invoice download impossible
This commit is contained in:
@@ -16,7 +16,6 @@ use Symfony\Component\HttpFoundation\StreamedResponse;
|
|||||||
use Symfony\Component\Routing\Attribute\Route;
|
use Symfony\Component\Routing\Attribute\Route;
|
||||||
use Symfony\Component\Security\Http\Attribute\IsGranted;
|
use Symfony\Component\Security\Http\Attribute\IsGranted;
|
||||||
use Symfony\Contracts\Cache\CacheInterface;
|
use Symfony\Contracts\Cache\CacheInterface;
|
||||||
|
|
||||||
use function Symfony\Component\String\u;
|
use function Symfony\Component\String\u;
|
||||||
|
|
||||||
class DownloadController extends AbstractController
|
class DownloadController extends AbstractController
|
||||||
@@ -62,17 +61,6 @@ class DownloadController extends AbstractController
|
|||||||
'booking_id' => $id,
|
'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 {
|
try {
|
||||||
$file = $this
|
$file = $this
|
||||||
->apiClient
|
->apiClient
|
||||||
|
|||||||
Reference in New Issue
Block a user