Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/controller/PhabricatorAuthController.php
Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | protected function loadAccountForRegistrationOrLinking($account_key) { | ||||
} | } | ||||
// NOTE: We're using the omnipotent user because the actual user may not | // NOTE: We're using the omnipotent user because the actual user may not | ||||
// be logged in yet, and because we want to tailor an error message to | // be logged in yet, and because we want to tailor an error message to | ||||
// distinguish between "not usable" and "does not exist". We do explicit | // distinguish between "not usable" and "does not exist". We do explicit | ||||
// checks later on to make sure this account is valid for the intended | // checks later on to make sure this account is valid for the intended | ||||
// operation. This requires edit permission for completeness and consistency | // operation. This requires edit permission for completeness and consistency | ||||
// but it won't actually be meaningfully checked because we're using the | // but it won't actually be meaningfully checked because we're using the | ||||
// ominpotent user. | // omnipotent user. | ||||
$account = id(new PhabricatorExternalAccountQuery()) | $account = id(new PhabricatorExternalAccountQuery()) | ||||
->setViewer(PhabricatorUser::getOmnipotentUser()) | ->setViewer(PhabricatorUser::getOmnipotentUser()) | ||||
->withAccountSecrets(array($account_key)) | ->withAccountSecrets(array($account_key)) | ||||
->needImages(true) | ->needImages(true) | ||||
->requireCapabilities( | ->requireCapabilities( | ||||
array( | array( | ||||
PhabricatorPolicyCapability::CAN_VIEW, | PhabricatorPolicyCapability::CAN_VIEW, | ||||
▲ Show 20 Lines • Show All 150 Lines • Show Last 20 Lines |