force authenticating on remote calendar

This commit is contained in:
Julien Fastré 2022-06-24 15:08:10 +02:00
parent ca44ebccf3
commit a845fddf2e

View File

@ -202,6 +202,10 @@ class CalendarController extends AbstractController
{ {
$this->denyAccessUnlessGranted('ROLE_USER'); $this->denyAccessUnlessGranted('ROLE_USER');
if (!$this->remoteCalendarConnector->isReady()) {
return $this->remoteCalendarConnector->getMakeReadyResponse($request->getUri());
}
if (!$this->getUser() instanceof User) { if (!$this->getUser() instanceof User) {
throw new UnauthorizedHttpException('you are not an user'); throw new UnauthorizedHttpException('you are not an user');
} }