mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
indexAction adjusted so that users who are only admin will still go to admin homepage.
This commit is contained in:
parent
c34c8035ea
commit
6f7bda9f0a
@ -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');
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user