Differential D20551 Diff 49035 src/applications/transactions/view/PhabricatorApplicationTransactionView.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/view/PhabricatorApplicationTransactionView.php
| Show First 20 Lines • Show All 499 Lines • ▼ Show 20 Lines | if ($this->getShowEditActions() && | ||||
| if ($xaction->hasComment() || $has_deleted_comment) { | if ($xaction->hasComment() || $has_deleted_comment) { | ||||
| $has_edit_capability = PhabricatorPolicyFilter::hasCapability( | $has_edit_capability = PhabricatorPolicyFilter::hasCapability( | ||||
| $viewer, | $viewer, | ||||
| $xaction, | $xaction, | ||||
| $can_edit); | $can_edit); | ||||
| if ($has_edit_capability && !$has_removed_comment) { | if ($has_edit_capability && !$has_removed_comment) { | ||||
| $event->setIsEditable(true); | $event->setIsEditable(true); | ||||
| } | } | ||||
| if ($has_edit_capability || $viewer->getIsAdmin()) { | if ($has_edit_capability || $viewer->getIsAdmin()) { | ||||
| if (!$has_removed_comment) { | if (!$has_removed_comment) { | ||||
| $event->setIsRemovable(true); | $event->setIsRemovable(true); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| $can_interact = PhabricatorPolicyFilter::hasCapability( | |||||
| $viewer, | |||||
| $xaction->getObject(), | |||||
| PhabricatorPolicyCapability::CAN_INTERACT); | |||||
| $event->setCanInteract($can_interact); | |||||
| } | } | ||||
| $comment = $this->renderTransactionContent($xaction); | $comment = $this->renderTransactionContent($xaction); | ||||
| if ($comment) { | if ($comment) { | ||||
| $event->appendChild($comment); | $event->appendChild($comment); | ||||
| } | } | ||||
| return $event; | return $event; | ||||
| Show All 21 Lines | |||||