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:
parent
14aa70a2e0
commit
387e3fac66
1 changed files with 8 additions and 9 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue