Search code examples
permissionsliferayportletroles

Liferay: Preventing a specific role from adding a specific portlet


I have a custom portlet that I have developed. I'd like only the admin role to be able to add it to a page. The problem is that the option to add the portlet appears in the Dockbar->Add->More menu for all users. How can I prevent anyone other than the Admin from


Solution

  • The following procedure should make it:

    1. Login as Administrator
    2. Go to Control Panel -> Plugins Configuration (make sure Portlet Plugin is selected on top menu)
    3. Search for your portlet name and click it
    4. In the Permissions table remove all Roles less then Administrator
    5. Save

    The following link fragment is a shortcut for starting at step 3 in Liferay 6:

    [YOUR_SERVER_PROTOCOL_AND_ADDRESS]/group/control_panel/manage?p_p_id=132&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&doAsGroupId=10156&refererPlid=10159