diff --git a/src/applications/legalpad/controller/LegalpadDocumentViewController.php b/src/applications/legalpad/controller/LegalpadDocumentViewController.php index 4a4a3097b8..4773881e08 100644 --- a/src/applications/legalpad/controller/LegalpadDocumentViewController.php +++ b/src/applications/legalpad/controller/LegalpadDocumentViewController.php @@ -61,8 +61,15 @@ final class LegalpadDocumentViewController extends LegalpadController { $title = $document_body->getTitle(); + $descriptions = PhabricatorPolicyQuery::renderPolicyDescriptions( + $user, + $document, + true); + $header = id(new PHUIHeaderView()) - ->setHeader($title); + ->setHeader($title) + ->addProperty(PHUIHeaderView::PROPERTY_POLICY, + $descriptions[PhabricatorPolicyCapability::CAN_VIEW]); $actions = $this->buildActionView($document); $properties = $this->buildPropertyView($document, $engine); @@ -174,14 +181,6 @@ final class LegalpadDocumentViewController extends LegalpadController { pht('Contributors'), $contributor_view); - $descriptions = PhabricatorPolicyQuery::renderPolicyDescriptions( - $user, - $document); - - $properties->addProperty( - pht('Visible To'), - $descriptions[PhabricatorPolicyCapability::CAN_VIEW]); - $properties->invokeWillRenderEvent(); return $properties;