Status: Closed (View Workflow)
Affects Version/s: Community Edition 201702 GA
Fix Version/s: Community Edition 201802 EA
Component/s: Share Application
Security Level: external (External user)
Resolution Time Custom Field:45 weeks, 5 days, 9 hours, 25 minutes, 43 seconds
Steps to reproduce:
- User 'userA' uploads file 'myFile' from local machine to his home folder.
- User 'userA' grants Consumer permission for file 'myFile' to user 'userB'.
- User 'userB' creates from file 'myFile' a document link via Copy to -> Create Link. As a destination he selects his (user 'userB') homefolder.
- User 'userA' deletes file 'myFile'.
- User 'userB' tries to see content of this homefolder through repository. He is unable to list his documents, screen hangs on 'Loading the Document Library...' label.
Motivation for such user story is, that when one user shares a document with another, it is handy to create a link for that file, so second does not have to remember the path to file in first users folders.
In the last step of steps to reproduce, browser console shows undefined JS error (please see attached screenshot). Share script documentlist.js is missing a reference to a link source document 'myFile'. This is due to fact, that link source was already deleted by 'userA'. Alfresco core service for document links - org.alfresco.repo.doclink.DocumentLinkServiceImpl registers a behaviour which should delete all links pointing to file which is under delete procedure. This is done by method #deleteLinksToDocument in mentioned class. This method fails to delete these link due to lack of permissions (link is owned by user 'userB'). However this failure is not reflected anywhere so deletion of file 'myFile' ends up successful.
I see more possibilities to handle such cases. For example: deletion of links should be done under system rights. Or documentlist.js will be adjusted to be able to cope with broken links.