From 820b5b43ebb3674772fa6561dc9eaa98cf42dcfa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Sun, 29 Nov 2020 07:08:40 +0100 Subject: [PATCH] Add translated location fetch Display only attributed session when not authenticated --- Controller/SessionController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Controller/SessionController.php b/Controller/SessionController.php index 8db10c6..183ac97 100644 --- a/Controller/SessionController.php +++ b/Controller/SessionController.php @@ -75,10 +75,11 @@ class SessionController extends DefaultController { //Fetch calendar //TODO: highlight with current session route parameter - $calendar = $doctrine->getRepository(Session::class)->fetchCalendarByDatePeriod($this->translator, $period, null, $request->get('session')); + $calendar = $doctrine->getRepository(Session::class)->fetchCalendarByDatePeriod($this->translator, $period, null, $request->get('session'), !$this->isGranted('IS_AUTHENTICATED_REMEMBERED')); //Fetch locations - $locations = $doctrine->getRepository(Location::class)->fetchTranslatedLocationByDatePeriod($this->translator, $period); + //XXX: we want to display all active locations anyway + $locations = $doctrine->getRepository(Location::class)->fetchTranslatedLocationByDatePeriod($this->translator, $period/*, !$this->isGranted('IS_AUTHENTICATED_REMEMBERED')*/); //Render the view return $this->render('@RapsysAir/session/index.html.twig', ['title' => $title, 'section' => $section, 'calendar' => $calendar, 'locations' => $locations]+$context+$this->context); -- 2.41.0