1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-09 16:32:39 +01:00

Fix Project Hovercard rendering @mention

Summary:
Fix T15762. There's a complex interaction with project's AutoCapability requiring the membership info
to be already loaded, and the Mention rule assuming any project is fully loaded before trying to check
permissions.

As far as I can tell, the "contextObject" is currently used only to make the mention handle gray if
the mentioned user can't see it.

Test Plan: Load a Project's hovercard that @mentions a user that can't see the project - no crash.

Reviewers: aklapper, O1 Blessed Committers

Reviewed By: aklapper, O1 Blessed Committers

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15762

Differential Revision: https://we.phorge.it/D25562
This commit is contained in:
Aviv Eyal 2024-03-26 20:07:14 +02:00
parent b1ae1b1a67
commit 216d308507

View file

@ -80,8 +80,7 @@ final class PhabricatorProjectCardView extends AphrontTagView {
$description = $description_field->getFieldValue();
if (phutil_nonempty_string($description)) {
$description = PhabricatorMarkupEngine::summarizeSentence($description);
$description = id(new PHUIRemarkupView($viewer, $description))
->setContextObject($project);
$description = id(new PHUIRemarkupView($viewer, $description));
$description = phutil_tag(
'div',