More precisely, this changeset fixes attachment, ticket, milestone, changset and changelog links. Wiki links already had the permission check. Source browser links are '''not''' fixed, as the permissions to be checked depend on the resource type (file or directory).
The rendering of wiki links to resources that are either not existing or inaccessible is also changed to remove the `href=` attribute, as they would lead to an error page anyway. The exceptions are wiki page links (to allow creating the page) and milestones (which should grow the same functionality shortly).
Closes #7655.