Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/query/PhabricatorExternalAccountQuery.php
Show All 9 Lines | |||||
* interact directly with objects and can leave comments, sign documents, etc. | * interact directly with objects and can leave comments, sign documents, etc. | ||||
* However, CAN_EDIT is restricted to users who own the accounts. | * However, CAN_EDIT is restricted to users who own the accounts. | ||||
*/ | */ | ||||
final class PhabricatorExternalAccountQuery | final class PhabricatorExternalAccountQuery | ||||
extends PhabricatorCursorPagedPolicyAwareQuery { | extends PhabricatorCursorPagedPolicyAwareQuery { | ||||
private $ids; | private $ids; | ||||
private $phids; | private $phids; | ||||
private $accountTypes; | |||||
private $accountDomains; | |||||
private $accountIDs; | private $accountIDs; | ||||
private $userPHIDs; | private $userPHIDs; | ||||
private $needImages; | private $needImages; | ||||
private $accountSecrets; | private $accountSecrets; | ||||
private $providerConfigPHIDs; | private $providerConfigPHIDs; | ||||
private $needAccountIdentifiers; | private $needAccountIdentifiers; | ||||
public function withUserPHIDs(array $user_phids) { | public function withUserPHIDs(array $user_phids) { | ||||
$this->userPHIDs = $user_phids; | $this->userPHIDs = $user_phids; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function withAccountIDs(array $account_ids) { | public function withAccountIDs(array $account_ids) { | ||||
$this->accountIDs = $account_ids; | $this->accountIDs = $account_ids; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function withAccountDomains(array $account_domains) { | |||||
$this->accountDomains = $account_domains; | |||||
return $this; | |||||
} | |||||
public function withAccountTypes(array $account_types) { | |||||
$this->accountTypes = $account_types; | |||||
return $this; | |||||
} | |||||
public function withPHIDs(array $phids) { | public function withPHIDs(array $phids) { | ||||
$this->phids = $phids; | $this->phids = $phids; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function withIDs($ids) { | public function withIDs($ids) { | ||||
$this->ids = $ids; | $this->ids = $ids; | ||||
return $this; | return $this; | ||||
▲ Show 20 Lines • Show All 115 Lines • ▼ Show 20 Lines | protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) { | ||||
if ($this->phids !== null) { | if ($this->phids !== null) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn, | $conn, | ||||
'phid IN (%Ls)', | 'phid IN (%Ls)', | ||||
$this->phids); | $this->phids); | ||||
} | } | ||||
if ($this->accountTypes !== null) { | |||||
$where[] = qsprintf( | |||||
$conn, | |||||
'accountType IN (%Ls)', | |||||
$this->accountTypes); | |||||
} | |||||
if ($this->accountDomains !== null) { | |||||
$where[] = qsprintf( | |||||
$conn, | |||||
'accountDomain IN (%Ls)', | |||||
$this->accountDomains); | |||||
} | |||||
if ($this->accountIDs !== null) { | if ($this->accountIDs !== null) { | ||||
$where[] = qsprintf( | $where[] = qsprintf( | ||||
$conn, | $conn, | ||||
'accountID IN (%Ls)', | 'accountID IN (%Ls)', | ||||
$this->accountIDs); | $this->accountIDs); | ||||
} | } | ||||
if ($this->userPHIDs !== null) { | if ($this->userPHIDs !== null) { | ||||
Show All 28 Lines |