1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-02 09:58:24 +01:00

Update one straggling "CAN_INTERACT" check in comment removal

Summary: See rPaacc62463d61. D20551 added some `CAN_INTERACT` checks, but `CAN_INTERACT` needs to be checked with `canInteract()` to fall back to `CAN_VIEW` properly. D20558 cleaned up most of this but missed one callsite; fix that up too.

Test Plan: Removed a comment on a commit.

Reviewers: amckinley, 20after4

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D20648
This commit is contained in:
epriestley 2019-07-11 15:47:53 -07:00
parent 099919366b
commit 41ea204144

View file

@ -38,10 +38,9 @@ final class PhabricatorApplicationTransactionCommentRemoveController
// from locked threads. // from locked threads.
$object = $xaction->getObject(); $object = $xaction->getObject();
$can_interact = PhabricatorPolicyFilter::hasCapability( $can_interact = PhabricatorPolicyFilter::canInteract(
$viewer, $viewer,
$object, $object);
PhabricatorPolicyCapability::CAN_INTERACT);
if (!$can_interact && !$viewer->getIsAdmin()) { if (!$can_interact && !$viewer->getIsAdmin()) {
return $this->newDialog() return $this->newDialog()
->setTitle(pht('Conversation Locked')) ->setTitle(pht('Conversation Locked'))