Changeset View
Changeset View
Standalone View
Standalone View
src/applications/doorkeeper/worker/DoorkeeperJIRAFeedWorker.php
| Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | protected function publishFeedStory() { | ||||
| } | } | ||||
| $xobjs = mgroup($xobjs, 'getApplicationDomain'); | $xobjs = mgroup($xobjs, 'getApplicationDomain'); | ||||
| foreach ($xobjs as $domain => $xobj_list) { | foreach ($xobjs as $domain => $xobj_list) { | ||||
| $accounts = id(new PhabricatorExternalAccountQuery()) | $accounts = id(new PhabricatorExternalAccountQuery()) | ||||
| ->setViewer($viewer) | ->setViewer($viewer) | ||||
| ->withUserPHIDs($try_users) | ->withUserPHIDs($try_users) | ||||
| ->withAccountTypes(array($provider->getProviderType())) | ->withProviderConfigPHIDs( | ||||
| ->withAccountDomains(array($domain)) | array( | ||||
| $provider->getProviderConfigPHID(), | |||||
| )) | |||||
| ->requireCapabilities( | ->requireCapabilities( | ||||
| array( | array( | ||||
| PhabricatorPolicyCapability::CAN_VIEW, | PhabricatorPolicyCapability::CAN_VIEW, | ||||
| PhabricatorPolicyCapability::CAN_EDIT, | PhabricatorPolicyCapability::CAN_EDIT, | ||||
| )) | )) | ||||
| ->execute(); | ->execute(); | ||||
| // Reorder accounts in the original order. | // Reorder accounts in the original order. | ||||
| // TODO: This needs to be adjusted if/when we allow you to link multiple | // TODO: This needs to be adjusted if/when we allow you to link multiple | ||||
| // accounts. | // accounts. | ||||
| $accounts = mpull($accounts, null, 'getUserPHID'); | $accounts = mpull($accounts, null, 'getUserPHID'); | ||||
| $accounts = array_select_keys($accounts, $try_users); | $accounts = array_select_keys($accounts, $try_users); | ||||
| foreach ($xobj_list as $xobj) { | foreach ($xobj_list as $xobj) { | ||||
| foreach ($accounts as $account) { | foreach ($accounts as $account) { | ||||
| ▲ Show 20 Lines • Show All 156 Lines • Show Last 20 Lines | |||||