mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 15:43:51 +00:00
indexAction adjusted so that users who are only admin will still go to admin homepage.
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user