diff --git a/src/Bundle/ChillMainBundle/Controller/DefaultController.php b/src/Bundle/ChillMainBundle/Controller/DefaultController.php index a83a1f11b..87c1fce91 100644 --- a/src/Bundle/ChillMainBundle/Controller/DefaultController.php +++ b/src/Bundle/ChillMainBundle/Controller/DefaultController.php @@ -20,6 +20,10 @@ class DefaultController extends AbstractController { public function indexAction() { + if ($this->isGranted('ROLE_ADMIN') && !in_array('ROLE_USER',$this->getUser()->getRoles())) { + return $this->redirectToRoute('chill_main_admin_central', [], 302); + } + return $this->render('@ChillMain/layout.html.twig'); }