robertgarrigos's picture

I want to have a different redirection to 403 pages per role.

Anonymous would go to user/login but logged users who try to access, for instance, a node/add/<content_type> they do not have permissions for, there are redirected to a different page where I can explain why they don't have access. The problem is that It is a private site, thus no content viewing for anonymous is allowed.

Is there a combination of modules/settings to achieve that? I cannot see any other than writing a module.

Accepted answer

You can probably achieve your goals by using the Redirect 403 to User Login module. While it redirects the HTTP 403 error page for anonymous visitors to the login page, you can define an alternative path for authenticated users. Once enabled, the module extends the configuration form on admin/config/system/site-information.

Comments

Olafski's picture

You can probably achieve your goals by using the Redirect 403 to User Login module. While it redirects the HTTP 403 error page for anonymous visitors to the login page, you can define an alternative path for authenticated users. Once enabled, the module extends the configuration form on admin/config/system/site-information.