indexAction adjusted so that users who are only admin will still go to admin homepage.

This commit is contained in:
Julie Lenaerts 2022-03-10 15:15:14 +01:00
parent c34c8035ea
commit 6f7bda9f0a

View File

@ -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');
}