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

NPE thrown when user has delete permission, but not other permissions

    Details

      Description

      When a user has permission to delete content, but does not have access to the recycle bin, a NullPointerException will be thrown.

      Steps to reproduce:

      1. Create a site role, and defined permission as following:
        • Site Administration > Content > Documents and Media:
        • Checked Access in Site Administration and View under General Permissions
        • Check the role do not have any permissions for the Recycle Bin.
      2. Create a user, choose Liferay site and the created site role.
      3. Go to Documents and Media, create a basic document.
      4. Click 3 dots icon of document > Permissions > Checked delete permission of site role, then save.
      5. Login as the newly user, go to Documents and Media.
      6. Try to remove the shortcut.

      Expected: ** Delete document successfully with no errors thrown and the standard message that the content was successfully deleted is shown.

      Actual result: The document is deleted, but a NPE is thrown.

      Note: the issue can be reproduced for any content that allows permission to be set directly on the content itself. For example, the issue can be reproduced for a blog or a bookmark by following Step 1 instead for Blogs or Bookmarks.

        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:
                  1 year, 43 weeks, 3 days ago

                  Packages

                  Version Package
                  7.0.0 DXP FP60
                  7.0.0 DXP SP9
                  7.0.X
                  7.1.0 M1
                  7.1.X
                  Master