Affects Version/s: 6.2.X EE, 7.0.0 DXP FP11, 7.0.0 DXP SP2, Master
Fix Version/s: None
Liferay's portlet configuration export functionality allows for an Export Permissions toggle. The problem is that when we configure a portlet's permissions, export the portlet configuration with Export Permissions toggled to YES, when we import the LAR file into a new site, the permissions from the original portlet are not transferred. this is because the permissions are not actually exported. This can be seen in the exported LAR, in the portlet-data-permissions.xml file.
Steps to Reproduce
- Start up a new Liferay environment
- Sign in as [email protected]
- On the top of the Welcome page, locate the Search portlet, and click on the hamburger menu > Go into Permissions
- In the Permissions panel, grant View permissions for all of the OOTB roles, then Save.
- Back in the Search portlet's hamburger menu > click on Export / Import
- Ensure that under Application "Configuration" is selected, and under "Permissions" Export Permissions is set to YES
- Save the LAR file
- Create a new Site (Control Panel > Sites > Sites > Add Blank site)
- Add a new public page to the newly created site, then go to the newly created public page
- Identify the Search portlet on the new page in the top right hand corner > Hamburger icon > Export / Import
- Click on the Import tab
- Drop in the LAR file saved from the old site, wait until it finishes uploading, then click Continue > Using the default settings, click Import
- After the import completes, click on the hamburger icon > Permissions and check to see if all of the roles' view permissions have been preserved from the import
Even though the portlet data export was configured to export permissions, the default permissions are set on the new site's portlet. This means that the permissions were not properly exported or imported. portlet-data-permissions.xml contains no permission data.
The permissions on the new site's portlet should reflect the previous site's portlet permissions. portlet-data-permissions.xml contains permission data.
DXP + DE-11