I have some user groups defined with their specific rules. A normal user or visitor is of course not allowed to access the admin dashboard. When I'm logged in as a user with no permissions to access the dashboard, I retrieve an error page from yii which says I'm not authorized to visit this page, what I want.
But instead of seeing this page, I want to be redirected immediately to the homepage with a flash message.
Where can I program this? I'm not sure if this is twig related or module related..
Anyone that can help me out?