From a845fddf2e79ee0cc7e732f71d601bf2cdca5bc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 24 Jun 2022 15:08:10 +0200 Subject: [PATCH] force authenticating on remote calendar --- .../ChillCalendarBundle/Controller/CalendarController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php b/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php index 7da682896..f247c69d4 100644 --- a/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php +++ b/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php @@ -202,6 +202,10 @@ class CalendarController extends AbstractController { $this->denyAccessUnlessGranted('ROLE_USER'); + if (!$this->remoteCalendarConnector->isReady()) { + return $this->remoteCalendarConnector->getMakeReadyResponse($request->getUri()); + } + if (!$this->getUser() instanceof User) { throw new UnauthorizedHttpException('you are not an user'); }