When a user doesn't have rights to see object document of a relation the display is broken.
Steps to reproduce:
- create two users: user1 with read rights on folder F1 and no rights on folder F2, and user2 with read-write rights on both folders.
- log in with user2 and create a document in F1. Next create a relation inside this document and a document in F2 (user1 can't see it).
- log in as user1 and access the previous document contained by F1. Go to relations and you will see a link to the document at which was made the relation from F2, but with ugly link and clicking on it leads to error.
Possible solutions: - do not display relations pointing to not visible documents
- display relations pointing to not visible documents but instead of link have title or path (NB: to obtain these probably a Unrestricted Runner must be called)
- display relations pointing to not visible documents but instead of link have some generic message
Which one is best? I would go the first, but it is not my decision.