If any user don’t have permission to access a portlet, Liferay Portal display the following permission error message
"you don't have required permission to access this portlet"
Instead of displaying the error message we can make that portlet invisible for that particular user by setting the following property in portal-ext.properties file –
layout.show.portlet.access.denied=false
Nice blog post, refreshing web page style, maintain the great work
ReplyDeleteSerious lover with this page, lots of your blogposts have seriously helped me out. Looking towards news!
ReplyDeleteHow can I customize the message so that I can ask the user to sign in to view the portlet or give a link to the sign on page?
ReplyDeleteError message can be customized by using the language hook. Here is the entry for portlet permission error in the language_en.properties file -
ReplyDeleteyou-do-not-have-the-roles-required-to-access-this-portlet=You do not have the roles required to access this portlet.
In the language hook override the language_en properties file and specify the error message of your choice.
Regards