mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14: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:
parent
e516358d54
commit
8d11e127ff
3 changed files with 14 additions and 8 deletions
|
@ -42,8 +42,9 @@ final class PhamePostArchiveController extends PhamePostController {
|
|||
|
||||
$title = pht('Archive Post');
|
||||
$body = pht(
|
||||
'This post will revert to archived status and no longer be visible '.
|
||||
'to other users or members of this blog.');
|
||||
'If you archive this post, it will only be visible to users who can '.
|
||||
'edit %s.',
|
||||
$viewer->renderHandle($post->getBlogPHID()));
|
||||
$button = pht('Archive Post');
|
||||
|
||||
return $this->newDialog()
|
||||
|
|
|
@ -46,8 +46,10 @@ final class PhamePostViewController
|
|||
->setSeverity(PHUIInfoView::SEVERITY_NOTICE)
|
||||
->setTitle(pht('Draft Post'))
|
||||
->appendChild(
|
||||
pht('Only you can see this draft until you publish it. '.
|
||||
'Use "Publish" to publish this post.')));
|
||||
pht(
|
||||
'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()) {
|
||||
|
@ -56,8 +58,10 @@ final class PhamePostViewController
|
|||
->setSeverity(PHUIInfoView::SEVERITY_ERROR)
|
||||
->setTitle(pht('Archived Post'))
|
||||
->appendChild(
|
||||
pht('Only you can see this archived post until you publish it. '.
|
||||
'Use "Publish" to publish this post.')));
|
||||
pht(
|
||||
'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()) {
|
||||
|
|
|
@ -200,8 +200,9 @@ final class PhamePost extends PhameDAO
|
|||
}
|
||||
|
||||
public function getPolicy($capability) {
|
||||
// Draft posts are visible only to the author. Published posts are visible
|
||||
// to whoever the blog is visible to.
|
||||
// Draft and archived posts are visible only to the author and other
|
||||
// users who can edit the blog. Published posts are visible to whoever
|
||||
// the blog is visible to.
|
||||
|
||||
switch ($capability) {
|
||||
case PhabricatorPolicyCapability::CAN_VIEW:
|
||||
|
|
Loading…
Reference in a new issue