Dynamic Data Mapping permissions no longer available in Define Permission for a regular role

Issue

  • After creating a new regular role, we are no longer able to get to:
    Dynamic Data Mapping > Dynamic Data Mapping Structure
    or to Dynamic Data Mapping > Dynamic Data Mapping Template
  • So, the "Dynamic Data Mapping" menu entry no longer exists in the left menu or in the search, so the permissions for "DYNAMIC DATA MAPPING STRUCTURE" and "DYNAMIC DATA MAPPING TEMPLATE" are not reachable.
  • These were available in 6.2

Environment

  • 7.2+ (probably 7.0 and 7.1 as well)

Resolution

  •  This is a current limitation introduced time ago by LPS-55497 that removed DDMTemplate and DDMStructure from DDM.
  • There is a plan to revamp the administration of the Widget Templates by creating a separate application that allows a site administrator to manage the widgets available within the site. This means that these permissions might not be needed in the future or will be changed. See https://issues.liferay.com/browse/LPS-83325
  • In the meantime, there are twopossible workarounds to apply the discussed DDM permissions to any role.
     
    A) Through the UI:
    1. Open the Role on the UI which needs the permissions.
    2. Gather the roleId from the URL of the page. (com_liferay_roles_admin_web_portlet_RolesAdminPortlet_roleId={roleId})
    3. Open the User role.
    4. Under Define Permissions, look for the "Dynamic Data Mapping: Add to Page" permission, right click on "Dynamic Data Mapping" and open the link in a new tab or window.
    5. In the URL switch the User role's id to the custom role's id (the one you obtained at step 2) - there are 2 appearances of the id in the URL. (After this, you should see the custom role's DDM permissions.)
    6. Assign the required DDM permissions to the custom role.
    Please find attached attached a screen recording showcasing these steps. (DDMPermissionWorkaround.mp4)
     
    B) With a script:
    1. Gather the instance's id either from the database (company table) or from Control Panel > Virtual Instances.Open the Role on the UI which needs the permissions.
    2. Gather the roleId  from the database (role_ table) or from the URL of the role's page (com_liferay_roles_admin_web_portlet_RolesAdminPortlet_roleId={roleId}).
    3. In the attached script (AddDDMPermissionsToRole.groovy), fill the companyId and roleId variables with the values obtained above.
    4. Execute the script under Control Panel > Server Administration > Script. 
Was this article helpful?
0 out of 0 found this helpful