Page MenuHomePhabricator Dev

Bug 1 - move enhancing private bug links to frontend
Needs ReviewPublic

Authored by • imadueme2 on Jun 28 2018, 10:50 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 8, 4:23 PM
Unknown Object (File)
Aug 4 2026, 12:25 AM
Unknown Object (File)
Aug 3 2026, 12:55 PM
Unknown Object (File)
Jul 22 2026, 4:05 AM
Unknown Object (File)
Jul 20 2026, 4:24 AM
Unknown Object (File)
Jun 24 2026, 5:19 PM
Unknown Object (File)
Jun 17 2026, 4:40 PM
Unknown Object (File)
Jun 14 2026, 11:16 AM
Subscribers
None

Details

Reviewers
purelogiq
Bugzilla Bug ID
Not provided
Summary

renderComment will enhance public bug links for both plaintext
and markdown comments, but, it doesn't do the same for private bugs
even if the user can see it (since it doesn't use the logged in user).
In addition, renderComment is unable to enhance markdown links that
may point to the current bmo instance (since the markdown isn't rendered
at the time renderComment does link enhancement).

This commit adds some client side code that will fetch extra data for
any private or otherwise un-enhanced links on the show bug page. When
fetching it uses the current user, so if they are able to view a private
bug it will be enhanced.

This works for attachments too.

The overall overhead of this code is very small since it only works upon
private/unenhanced links and it limits the api responses by specifiying
the exact data required. In total it adds about 2 API requests to each
show bug page and the initial render time of the page stays about the
same.

Diff Detail

Repository
rTEST test
Branch
default

Event Timeline

phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".Jun 28 2018, 10:50 AM
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: Restricted Project.
• imadueme2 retitled this revision from added a to move enhancing private bug links to frontend .Jul 12 2018, 2:10 PM
• imadueme2 edited the summary of this revision. (Show Details)
• imadueme2 added a reviewer: purelogiq.
• imadueme2 retitled this revision from move enhancing private bug links to frontend to Bug 1 - move enhancing private bug links to frontend .