Affects Version/s: 7.0.X, Master
Component/s: Recycle Bin
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:
- 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.
- Create a user, choose Liferay site and the created site role.
- Go to Documents and Media, create a basic document.
- Click 3 dots icon of document > Permissions > Checked delete permission of site role, then save.
- Login as the newly user, go to Documents and Media.
- 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.