Skip to content

Commit 8d11e12

Browse files
author
epriestley
committedJul 6, 2017
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
1 parent e516358 commit 8d11e12

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed
 

‎src/applications/phame/controller/post/PhamePostArchiveController.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ public function handleRequest(AphrontRequest $request) {
4242

4343
$title = pht('Archive Post');
4444
$body = pht(
45-
'This post will revert to archived status and no longer be visible '.
46-
'to other users or members of this blog.');
45+
'If you archive this post, it will only be visible to users who can '.
46+
'edit %s.',
47+
$viewer->renderHandle($post->getBlogPHID()));
4748
$button = pht('Archive Post');
4849

4950
return $this->newDialog()

‎src/applications/phame/controller/post/PhamePostViewController.php

+8-4
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@ public function handleRequest(AphrontRequest $request) {
4646
->setSeverity(PHUIInfoView::SEVERITY_NOTICE)
4747
->setTitle(pht('Draft Post'))
4848
->appendChild(
49-
pht('Only you can see this draft until you publish it. '.
50-
'Use "Publish" to publish this post.')));
49+
pht(
50+
'This is a draft, and is only visible to you and other users '.
51+
'who can edit %s. Use "Publish" to publish this post.',
52+
$viewer->renderHandle($post->getBlogPHID()))));
5153
}
5254

5355
if ($post->isArchived()) {
@@ -56,8 +58,10 @@ public function handleRequest(AphrontRequest $request) {
5658
->setSeverity(PHUIInfoView::SEVERITY_ERROR)
5759
->setTitle(pht('Archived Post'))
5860
->appendChild(
59-
pht('Only you can see this archived post until you publish it. '.
60-
'Use "Publish" to publish this post.')));
61+
pht(
62+
'This post has been archived, and is only visible to you and '.
63+
'other users who can edit %s.',
64+
$viewer->renderHandle($post->getBlogPHID()))));
6165
}
6266

6367
if (!$post->getBlog()) {

‎src/applications/phame/storage/PhamePost.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,9 @@ public function getCapabilities() {
200200
}
201201

202202
public function getPolicy($capability) {
203-
// Draft posts are visible only to the author. Published posts are visible
204-
// to whoever the blog is visible to.
203+
// Draft and archived posts are visible only to the author and other
204+
// users who can edit the blog. Published posts are visible to whoever
205+
// the blog is visible to.
205206

206207
switch ($capability) {
207208
case PhabricatorPolicyCapability::CAN_VIEW:

0 commit comments

Comments
 (0)
Failed to load comments.