make redirection to home page temporarily

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.
This commit is contained in:
Julien Fastré 2019-10-23 11:52:16 +02:00
parent dd7b14b6f2
commit b3d9954c15
3 changed files with 5 additions and 2 deletions

View File

@ -70,4 +70,7 @@ Version 1.5.11
- improve return path functions and filters ;
Branche master
==============
- make the redirection to admin temporarily: some admin experienced cache problems (403 error) when they switched from one admin account to a non-admin one ;

View File

@ -10,7 +10,7 @@ class DefaultController extends Controller
{
if ($this->isGranted('ROLE_ADMIN')) {
return $this->redirectToRoute('chill_main_admin_central');
return $this->redirectToRoute('chill_main_admin_central', [], 302);
}
return $this->render('ChillMainBundle::layout.html.twig');

View File

@ -35,7 +35,7 @@ root:
defaults:
_controller: FrameworkBundle:Redirect:urlRedirect
path: /homepage
permanent: true
permanent: false
chill_main_homepage_without_locale:
path: /homepage