The link for subscription notification depends on where the file was uploaded.
The following scenario describes a case where the Documents and Media widget (I'll call it D&M widget from here on) is on a public homepage, and is scoped to the Global site.
A regular user subscribes to the D&M widget, and receives a notification whenever anything is uploaded to the Global site's Documents and Media.
If an admin uploads a file through the D&M widget, the user sees the notification and can follow the link to land on the file via the D&M widget on that public page.
If an admin uploads the file through Control Panel, the user sees the notification and cannot follow the link as they receive errors indicating You do not have the roles required to access this portlet.
Steps to Reproduce
- Login as firstname.lastname@example.org
- Add a user named "user1"
- Add a Documents and Media portlet to any page and change the scope setting to "Global"
- Login as user1 with another browser
- Subscribe to the Documents and Media widget configured in step #3
- As email@example.com, add a document to the Documents and Media widget on the page
- Assert that firstname.lastname@example.org receives a notification for the upload, and can access the link to land on http://hostname/web/guest/home/-/document_library/sM2kxUSOccES/view_file/35014
- As email@example.com, navigate to Global site > Content & Data > Documents and Media and add a document
- As firstname.lastname@example.org, check the notification message
- Click on the latest notification message's link http://hostname/group/global/~/control_panel/manage?p_p_id=com_liferay_document_library_web_portlet_DLPortlet&p_p_lifecycle=0&p_p_state=maximized&_com_liferay_document_library_web_portlet_DLPortlet_mvcRenderCommandName=%2Fdocument_library%2Fview_file_entry&_com_liferay_document_library_web_portlet_DLPortlet_fileEntryId=35036&p_p_auth=RTjR6DXA
The user is unable to access documents sent to their notification if files were added through the Control Panel.
The user is able to access documents sent to their notification even if files were added through the Control Panel via the page's Documents and Media widget they are subscribed to.
DXP 7.2 GA1
7.2.X Commit: 6b58cd5deca575d517780ea8c49d550f9c4da692