mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-20 20:40:56 +01:00
T6594, Logged out users should see "View Raw" in dropdown of timeline items
Summary: Fixes T6594, Logged out users should be able to "View Raw" comments in public objects. Test Plan: Log out, open maniphest task with comments, open dropdown associated with comment, click "View Raw", should be able to see raw comment. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Maniphest Tasks: T6594 Differential Revision: https://secure.phabricator.com/D11295
This commit is contained in:
parent
e0aa33c46b
commit
7a6f4ab75a
3 changed files with 18 additions and 1 deletions
|
@ -85,4 +85,8 @@ final class PhabricatorApplicationTransactionCommentRawController
|
|||
return id(new AphrontDialogResponse())->setDialog($dialog);
|
||||
}
|
||||
|
||||
public function shouldAllowPublic() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -451,6 +451,8 @@ class PhabricatorApplicationTransactionView extends AphrontView {
|
|||
$event->setIsEdited(true);
|
||||
}
|
||||
|
||||
$event->setIsNormalComment(true);
|
||||
|
||||
// If we have a place for quoted text to go and this is a quotable
|
||||
// comment, pass the quote target ID to the event view.
|
||||
if ($this->getQuoteTargetID()) {
|
||||
|
|
|
@ -22,6 +22,7 @@ final class PHUITimelineEventView extends AphrontView {
|
|||
private $token;
|
||||
private $tokenRemoved;
|
||||
private $quoteTargetID;
|
||||
private $isNormalComment;
|
||||
private $quoteRef;
|
||||
private $reallyMajorEvent;
|
||||
|
||||
|
@ -43,6 +44,15 @@ final class PHUITimelineEventView extends AphrontView {
|
|||
return $this->quoteTargetID;
|
||||
}
|
||||
|
||||
public function setIsNormalComment($is_normal_comment) {
|
||||
$this->isNormalComment = $is_normal_comment;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getIsNormalComment() {
|
||||
return $this->isNormalComment;
|
||||
}
|
||||
|
||||
public function setHideByDefault($hide_by_default) {
|
||||
$this->hideByDefault = $hide_by_default;
|
||||
return $this;
|
||||
|
@ -547,8 +557,9 @@ final class PHUITimelineEventView extends AphrontView {
|
|||
'uri' => '/transactions/quote/'.$xaction_phid.'/',
|
||||
'ref' => $ref,
|
||||
));
|
||||
}
|
||||
|
||||
// if there is something to quote then there is something to view raw
|
||||
if ($this->getIsNormalComment()) {
|
||||
$items[] = id(new PhabricatorActionView())
|
||||
->setIcon('fa-cutlery')
|
||||
->setHref('/transactions/raw/'.$xaction_phid.'/')
|
||||
|
|
Loading…
Reference in a new issue