Differential D16161 Diff 38877 src/applications/search/controller/PhabricatorSearchAttachController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/controller/PhabricatorSearchAttachController.php
Show All 12 Lines | $handle = id(new PhabricatorHandleQuery()) | ||||
->setViewer($user) | ->setViewer($user) | ||||
->withPHIDs(array($phid)) | ->withPHIDs(array($phid)) | ||||
->executeOne(); | ->executeOne(); | ||||
$object_type = $handle->getType(); | $object_type = $handle->getType(); | ||||
$object = id(new PhabricatorObjectQuery()) | $object = id(new PhabricatorObjectQuery()) | ||||
->setViewer($user) | ->setViewer($user) | ||||
->requireCapabilities( | |||||
array( | |||||
PhabricatorPolicyCapability::CAN_VIEW, | |||||
PhabricatorPolicyCapability::CAN_EDIT, | |||||
)) | |||||
->withPHIDs(array($phid)) | ->withPHIDs(array($phid)) | ||||
->executeOne(); | ->executeOne(); | ||||
if (!$object) { | if (!$object) { | ||||
return new Aphront404Response(); | return new Aphront404Response(); | ||||
} | } | ||||
$edge_type = null; | $edge_type = null; | ||||
▲ Show 20 Lines • Show All 297 Lines • Show Last 20 Lines |