Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-45565

Plugin portlet cannot be rendered in Control Panel

    Details

      Description

      If the user has only permission to see a single plugin portlet (installed as a .war) in Control Panel, the portlet won't be rendered, only if we add another portlet's view permission.

      Reproduction steps:

      1) Create a test portlet which configured to be shown in Control Panel, or deploy the attached Test Portlet.

      2) Deploy the portlet

      3) Create a new regular role and add all the possible permissions of the TestPortlet, these are:
      Access in Control Panel
      Add to Page
      Configuration
      Permissions
      View

      4) Create a User and add the newly created Role to him

      5) Log in with the user and Go to Control Panel
      Result: You can't see the portlet and there is an exception

      Caused by: java.lang.NullPointerException
      at com.liferay.portal.service.permission.PortletPermissionImpl.hasControlPanelAccessPermission(PortletPermissionImpl.java:504)
      at com.liferay.portal.service.permission.PortletPermissionImpl.hasControlPanelAccessPermission(PortletPermissionImpl.java:527)
      at com.liferay.portal.service.permission.PortletPermissionUtil.hasControlPanelAccessPermission(PortletPermissionUtil.java:314)
      at com.liferay.portlet.PortletPreferencesFactoryImpl.checkControlPanelPortletPreferences(PortletPreferencesFactoryImpl.java:101)
      at com.liferay.portlet.PortletPreferencesFactoryUtil.checkControlPanelPortletPreferences(PortletPreferencesFactoryUtil.java:46)
      at com.liferay.portlet.PortletContainerImpl._doRender(PortletContainerImpl.java:600)
      at com.liferay.portlet.PortletContainerImpl.render(PortletContainerImpl.java:138)
      ... 153 more

      6) Add the (for example) the view and access in control panel permissions of Users and Organizations to the Role
      Result: You'll see both portlets
      This is because when you have permission to view only a single portlet in Control Panel, then the one portlet is supposed to be rendered.

      But when you are permitted to view at least two porlets, a list of links to those portlets will be rendered. Besides a link to Users and Organizations, the link to the TestPortlet will be present.

      The issue was reproduced on ee-6.2.x and master.

      You can reproduce this issue with any plugin portlet, for example wsrp.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  6 years, 24 weeks ago

                  Packages

                  Version Package
                  6.2.2 CE GA3
                  6.2.X EE
                  7.0.0 M1