Differential D20558 Diff 49043 src/applications/transactions/editor/PhabricatorApplicationTransactionCommentEditor.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/editor/PhabricatorApplicationTransactionCommentEditor.php
Show First 20 Lines • Show All 183 Lines • ▼ Show 20 Lines | private function validateEdit( | ||||
if ($comment->getIsRemoved() && $actor->getIsAdmin()) { | if ($comment->getIsRemoved() && $actor->getIsAdmin()) { | ||||
// NOTE: Administrators can remove comments by any user, and don't need | // NOTE: Administrators can remove comments by any user, and don't need | ||||
// to pass the edit check. | // to pass the edit check. | ||||
} else { | } else { | ||||
PhabricatorPolicyFilter::requireCapability( | PhabricatorPolicyFilter::requireCapability( | ||||
$actor, | $actor, | ||||
$xaction, | $xaction, | ||||
PhabricatorPolicyCapability::CAN_EDIT); | PhabricatorPolicyCapability::CAN_EDIT); | ||||
PhabricatorPolicyFilter::requireCapability( | |||||
PhabricatorPolicyFilter::requireCanInteract( | |||||
$actor, | $actor, | ||||
$xaction->getObject(), | $xaction->getObject()); | ||||
PhabricatorPolicyCapability::CAN_INTERACT); | |||||
} | } | ||||
} | } | ||||
private function applyMFAChecks( | private function applyMFAChecks( | ||||
PhabricatorApplicationTransaction $xaction, | PhabricatorApplicationTransaction $xaction, | ||||
PhabricatorApplicationTransactionComment $comment) { | PhabricatorApplicationTransactionComment $comment) { | ||||
$actor = $this->requireActor(); | $actor = $this->requireActor(); | ||||
▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines |