rizalvi
12 years agoMentor
How to display custom authentication error messages for specific categories
A few categories of our community site are limited only to users with specific roles. We would like for users without those roles to be presented with an error message explaining who they should contact to obtain the necessary permissions if they try to access these categories. Our current implementation involves using Freemarker code to replace the main body of each page with an error message when a user des not have the required role, but this involves a lot of code duplication and does not work for some pages, such as forums. Is there a better, built-in way to display custom authentication error messages?