redirect on login

This commit is contained in:
Charles 2025-09-05 11:08:27 +02:00
parent 20bc6e92bc
commit 307e615fb3
1 changed files with 5 additions and 1 deletions

View File

@ -14,9 +14,13 @@ final class IndexController extends AbstractController
#[Route('/', name: 'app_index')] #[Route('/', name: 'app_index')]
public function index(): Response public function index(): Response
{ {
if($this->isGranted('ROLE_ADMIN')){ if ($this->isGranted('ROLE_ADMIN')) {
return $this->redirectToRoute('organization_index'); return $this->redirectToRoute('organization_index');
} }
if($this->isGranted('ROLE_USER')) {
return $this->redirectToRoute('application_index');
}
return $this->render('index/index.html.twig', [ return $this->render('index/index.html.twig', [
'controller_name' => 'IndexController', 'controller_name' => 'IndexController',
]); ]);