1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 01:02:42 +01:00

Roll out more Policy Headers

This commit is contained in:
Chad Little 2013-09-18 14:50:39 -07:00
parent 14aa70a2e0
commit 387e3fac66

View file

@ -61,8 +61,15 @@ final class LegalpadDocumentViewController extends LegalpadController {
$title = $document_body->getTitle(); $title = $document_body->getTitle();
$descriptions = PhabricatorPolicyQuery::renderPolicyDescriptions(
$user,
$document,
true);
$header = id(new PHUIHeaderView()) $header = id(new PHUIHeaderView())
->setHeader($title); ->setHeader($title)
->addProperty(PHUIHeaderView::PROPERTY_POLICY,
$descriptions[PhabricatorPolicyCapability::CAN_VIEW]);
$actions = $this->buildActionView($document); $actions = $this->buildActionView($document);
$properties = $this->buildPropertyView($document, $engine); $properties = $this->buildPropertyView($document, $engine);
@ -174,14 +181,6 @@ final class LegalpadDocumentViewController extends LegalpadController {
pht('Contributors'), pht('Contributors'),
$contributor_view); $contributor_view);
$descriptions = PhabricatorPolicyQuery::renderPolicyDescriptions(
$user,
$document);
$properties->addProperty(
pht('Visible To'),
$descriptions[PhabricatorPolicyCapability::CAN_VIEW]);
$properties->invokeWillRenderEvent(); $properties->invokeWillRenderEvent();
return $properties; return $properties;