Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-17935

CLONE - Deleting linked document leads to broken destination folder of link



      Steps to reproduce:

      1. User 'userA' uploads file 'myFile' from local machine to his home folder.
      2. User 'userA' grants Consumer permission for file 'myFile' to user 'userB'.
      3. User 'userB' creates from file 'myFile' a document link via Copy to -> Create Link. As a destination he selects his (user 'userB') homefolder.
      4. User 'userA' deletes file 'myFile'.
      5. 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.

      Technical analysis:
      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.


          Issue Links




                • Assignee:
                  closedbugs Closed Bugs
                  Valus Miroslav (Inactive)
                • Votes:
                  0 Vote for this issue
                  6 Start watching this issue


                  • Created:

                    Structure Helper Panel