mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Some users experienced 403 error when they switched from an admin account to a non-admin account, due to the browser cache containing a redirection.
23 lines
566 B
PHP
23 lines
566 B
PHP
<?php
|
|
|
|
namespace Chill\MainBundle\Controller;
|
|
|
|
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
|
|
|
class DefaultController extends Controller
|
|
{
|
|
public function indexAction()
|
|
{
|
|
if ($this->isGranted('ROLE_ADMIN')) {
|
|
|
|
return $this->redirectToRoute('chill_main_admin_central', [], 302);
|
|
}
|
|
|
|
return $this->render('ChillMainBundle::layout.html.twig');
|
|
}
|
|
|
|
public function indexWithoutLocaleAction()
|
|
{
|
|
return $this->redirect($this->generateUrl('chill_main_homepage'));
|
|
}
|
|
} |