Differential D20558 Diff 49043 src/applications/transactions/controller/PhabricatorApplicationTransactionCommentEditController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/controller/PhabricatorApplicationTransactionCommentEditController.php
Show All 30 Lines | public function handleRequest(AphrontRequest $request) { | ||||
$done_uri = $obj_handle->getURI(); | $done_uri = $obj_handle->getURI(); | ||||
// If an object is locked, you can't edit comments on it. Two reasons to | // If an object is locked, you can't edit comments on it. Two reasons to | ||||
// lock threads are to calm contentious issues and to freeze state for | // lock threads are to calm contentious issues and to freeze state for | ||||
// auditing, and editing comments serves neither goal. | // auditing, and editing comments serves neither goal. | ||||
$object = $xaction->getObject(); | $object = $xaction->getObject(); | ||||
$can_interact = PhabricatorPolicyFilter::hasCapability( | $can_interact = PhabricatorPolicyFilter::canInteract( | ||||
$viewer, | $viewer, | ||||
$object, | $object); | ||||
PhabricatorPolicyCapability::CAN_INTERACT); | |||||
if (!$can_interact) { | if (!$can_interact) { | ||||
return $this->newDialog() | return $this->newDialog() | ||||
->setTitle(pht('Conversation Locked')) | ->setTitle(pht('Conversation Locked')) | ||||
->appendParagraph( | ->appendParagraph( | ||||
pht( | pht( | ||||
'You can not edit this comment because the conversation is '. | 'You can not edit this comment because the conversation is '. | ||||
'locked.')) | 'locked.')) | ||||
->addCancelButton($done_uri); | ->addCancelButton($done_uri); | ||||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |