mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +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);
|
return id(new AphrontDialogResponse())->setDialog($dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function shouldAllowPublic() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -451,6 +451,8 @@ class PhabricatorApplicationTransactionView extends AphrontView {
|
||||||
$event->setIsEdited(true);
|
$event->setIsEdited(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$event->setIsNormalComment(true);
|
||||||
|
|
||||||
// If we have a place for quoted text to go and this is a quotable
|
// 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.
|
// comment, pass the quote target ID to the event view.
|
||||||
if ($this->getQuoteTargetID()) {
|
if ($this->getQuoteTargetID()) {
|
||||||
|
|
|
@ -22,6 +22,7 @@ final class PHUITimelineEventView extends AphrontView {
|
||||||
private $token;
|
private $token;
|
||||||
private $tokenRemoved;
|
private $tokenRemoved;
|
||||||
private $quoteTargetID;
|
private $quoteTargetID;
|
||||||
|
private $isNormalComment;
|
||||||
private $quoteRef;
|
private $quoteRef;
|
||||||
private $reallyMajorEvent;
|
private $reallyMajorEvent;
|
||||||
|
|
||||||
|
@ -43,6 +44,15 @@ final class PHUITimelineEventView extends AphrontView {
|
||||||
return $this->quoteTargetID;
|
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) {
|
public function setHideByDefault($hide_by_default) {
|
||||||
$this->hideByDefault = $hide_by_default;
|
$this->hideByDefault = $hide_by_default;
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -547,8 +557,9 @@ final class PHUITimelineEventView extends AphrontView {
|
||||||
'uri' => '/transactions/quote/'.$xaction_phid.'/',
|
'uri' => '/transactions/quote/'.$xaction_phid.'/',
|
||||||
'ref' => $ref,
|
'ref' => $ref,
|
||||||
));
|
));
|
||||||
|
}
|
||||||
|
|
||||||
// if there is something to quote then there is something to view raw
|
if ($this->getIsNormalComment()) {
|
||||||
$items[] = id(new PhabricatorActionView())
|
$items[] = id(new PhabricatorActionView())
|
||||||
->setIcon('fa-cutlery')
|
->setIcon('fa-cutlery')
|
||||||
->setHref('/transactions/raw/'.$xaction_phid.'/')
|
->setHref('/transactions/raw/'.$xaction_phid.'/')
|
||||||
|
|
Loading…
Reference in a new issue