1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 16:52:41 +01:00

Fix several pieces of UI language describing "draft/archive" rules in Phame

Summary: Ref T12900. We implement one rule, but tell users a different (older) rule. See T12900 for discussion and history.

Test Plan:
  - Verified draft/archived posts can't be seen by users who don't have permission to edit the blog.
  - Drafted, archived, and published posts and read the related text.
  - Looked through the changes I dug up in T12900#228748 for other strings I might have missed.

{F5033860}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12900

Differential Revision: https://secure.phabricator.com/D18182
This commit is contained in:
epriestley 2017-07-05 09:35:59 -07:00
parent e516358d54
commit 8d11e127ff
3 changed files with 14 additions and 8 deletions

View file

@ -42,8 +42,9 @@ final class PhamePostArchiveController extends PhamePostController {
$title = pht('Archive Post'); $title = pht('Archive Post');
$body = pht( $body = pht(
'This post will revert to archived status and no longer be visible '. 'If you archive this post, it will only be visible to users who can '.
'to other users or members of this blog.'); 'edit %s.',
$viewer->renderHandle($post->getBlogPHID()));
$button = pht('Archive Post'); $button = pht('Archive Post');
return $this->newDialog() return $this->newDialog()

View file

@ -46,8 +46,10 @@ final class PhamePostViewController
->setSeverity(PHUIInfoView::SEVERITY_NOTICE) ->setSeverity(PHUIInfoView::SEVERITY_NOTICE)
->setTitle(pht('Draft Post')) ->setTitle(pht('Draft Post'))
->appendChild( ->appendChild(
pht('Only you can see this draft until you publish it. '. pht(
'Use "Publish" to publish this post.'))); 'This is a draft, and is only visible to you and other users '.
'who can edit %s. Use "Publish" to publish this post.',
$viewer->renderHandle($post->getBlogPHID()))));
} }
if ($post->isArchived()) { if ($post->isArchived()) {
@ -56,8 +58,10 @@ final class PhamePostViewController
->setSeverity(PHUIInfoView::SEVERITY_ERROR) ->setSeverity(PHUIInfoView::SEVERITY_ERROR)
->setTitle(pht('Archived Post')) ->setTitle(pht('Archived Post'))
->appendChild( ->appendChild(
pht('Only you can see this archived post until you publish it. '. pht(
'Use "Publish" to publish this post.'))); 'This post has been archived, and is only visible to you and '.
'other users who can edit %s.',
$viewer->renderHandle($post->getBlogPHID()))));
} }
if (!$post->getBlog()) { if (!$post->getBlog()) {

View file

@ -200,8 +200,9 @@ final class PhamePost extends PhameDAO
} }
public function getPolicy($capability) { public function getPolicy($capability) {
// Draft posts are visible only to the author. Published posts are visible // Draft and archived posts are visible only to the author and other
// to whoever the blog is visible to. // users who can edit the blog. Published posts are visible to whoever
// the blog is visible to.
switch ($capability) { switch ($capability) {
case PhabricatorPolicyCapability::CAN_VIEW: case PhabricatorPolicyCapability::CAN_VIEW: