1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-24 14:30:56 +01:00

Don't show comment draft state to non-object-owners

Summary: Fixes T7720. We currently leak the "draft" state of checkboxes; never treat checkboxes as drafts if you can't mark them.

Test Plan: Checked a box, reloaded page in other browser. Previously, the draft state partially propagated. Now, it no longer does.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T7720

Differential Revision: https://secure.phabricator.com/D12262
This commit is contained in:
epriestley 2015-04-02 07:27:53 -07:00
parent 1ae1cdd7ba
commit 638cdb8d57

View file

@ -252,6 +252,12 @@ final class PHUIDiffInlineCommentDetailView
break; break;
} }
// If you don't have permission to mark the comment as "Done", you also
// can not see the draft state.
if (!$this->getCanMarkDone()) {
$draft_state = false;
}
if ($is_done) { if ($is_done) {
$classes[] = 'inline-is-done'; $classes[] = 'inline-is-done';
} }