Wednesday, April 27, 2011

Removing Portlet Permission Error Message

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

4 comments:

  1. Nice blog post, refreshing web page style, maintain the great work

    ReplyDelete
  2. Serious lover with this page, lots of your blogposts have seriously helped me out. Looking towards news!

    ReplyDelete
  3. How 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?

    ReplyDelete
  4. Error message can be customized by using the language hook. Here is the entry for portlet permission error in the language_en.properties file -

    you-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

    ReplyDelete