Changeset View
Changeset View
Standalone View
Standalone View
src/applications/doorkeeper/bridge/DoorkeeperBridgeJIRA.php
Show All 24 Lines | public function pullRefs(array $refs) { | ||||
$provider = PhabricatorJIRAAuthProvider::getJIRAProvider(); | $provider = PhabricatorJIRAAuthProvider::getJIRAProvider(); | ||||
if (!$provider) { | if (!$provider) { | ||||
return; | return; | ||||
} | } | ||||
$accounts = id(new PhabricatorExternalAccountQuery()) | $accounts = id(new PhabricatorExternalAccountQuery()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->withUserPHIDs(array($viewer->getPHID())) | ->withUserPHIDs(array($viewer->getPHID())) | ||||
->withAccountTypes(array($provider->getProviderType())) | ->withProviderConfigPHIDs( | ||||
array( | |||||
$provider->getProviderConfigPHID(), | |||||
)) | |||||
->requireCapabilities( | ->requireCapabilities( | ||||
array( | array( | ||||
PhabricatorPolicyCapability::CAN_VIEW, | PhabricatorPolicyCapability::CAN_VIEW, | ||||
PhabricatorPolicyCapability::CAN_EDIT, | PhabricatorPolicyCapability::CAN_EDIT, | ||||
)) | )) | ||||
->execute(); | ->execute(); | ||||
if (!$accounts) { | if (!$accounts) { | ||||
▲ Show 20 Lines • Show All 113 Lines • Show Last 20 Lines |