From b3d9954c15ec399239fcf29b1a439656a7184fe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 23 Oct 2019 11:52:16 +0200 Subject: [PATCH] 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. --- CHANGELOG.md | 3 +++ Controller/DefaultController.php | 2 +- Resources/config/routing.yml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a3f9df53..fbb44c414 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 ; diff --git a/Controller/DefaultController.php b/Controller/DefaultController.php index ba44375ed..b10bf0d23 100644 --- a/Controller/DefaultController.php +++ b/Controller/DefaultController.php @@ -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'); diff --git a/Resources/config/routing.yml b/Resources/config/routing.yml index 9ac1d255c..c6ab5918e 100644 --- a/Resources/config/routing.yml +++ b/Resources/config/routing.yml @@ -35,7 +35,7 @@ root: defaults: _controller: FrameworkBundle:Redirect:urlRedirect path: /homepage - permanent: true + permanent: false chill_main_homepage_without_locale: path: /homepage