Symfony 2 : Redirect a user to a page if he has a specific role
问题 I have a little question. I want that wherever is the user on my website, if he have the role "ROLE_DEGRADE", he is redirected on a specific page. How I can do that, I have to use firewall ? I don't want to redirect the user to a form login, just to a simple page. I want that everywhere on my website, without put a "if role degrade..." everywhere, in all my controllers... Thanks for your help ;) 回答1: Something like this should do it ... Create a new listener : class AccessListener { private