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

Manage vocabularies and permissions bug

    Details

      Description

      Users who do not have permission for Site Permissions (com.liferay.portal.model.Group; PERMISSION) but have permissions to manage actually manage Vocabularies.

      To reproduce:

      1. Create an organization
      2. Create an Organization Role
      3. Define permissions to manage categories and vocabularies for that role
      4. Create a user with that Organization Role
      5. Try to manage Vocabularies (none are visible, but you can add vocabularies)

      To fix the view bug you need to give that role a permission to manage Site permissions.

      6. Go to "Define Permissions" of that role
      7. Select "Organization Administration"
      8. Check the "Permission" of Site box.

      The vocabularies will become visible.

      Why it happens:

      File : liferay/portal-web/docroot/html/portlet/asset_category_admin/view.jsp
      At line 33 :
      <c:if test="<%= GroupPermissionUtil.contains(permissionChecker, themeDisplay.getParentGroupId(), ActionKeys.PERMISSIONS) %>">
      ...
      <aui:button cssClass="permissions-button" data-url="<%= permissionsURL %>" name="categoryPermissionsButton" value="permissions" />
      </c:if>

      So the button will be on the page only if the user has permission for Group PERMISSION

      then on the file:
      liferay/portal-web/docroot/html/portlet/asset_category_admin/js/main.js

      At line 251 :
      A.one(idPrefix + 'categoryPermissionsButton').on(EVENT_CLICK, instance._onChangePermissions, instance);

      The button is not there and the script fails, thus it does not load the vocabulary content.

        Attachments

          Activity

            People

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

              Dates

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

                Packages

                Version Package
                6.2.0 CE M4