Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/controller/PhabricatorAuthUnlinkController.php
Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | final class PhabricatorAuthUnlinkController | ||||
} | } | ||||
private function renderNoAccountErrorDialog() { | private function renderNoAccountErrorDialog() { | ||||
$dialog = id(new AphrontDialogView()) | $dialog = id(new AphrontDialogView()) | ||||
->setUser($this->getRequest()->getUser()) | ->setUser($this->getRequest()->getUser()) | ||||
->setTitle(pht('No Such Account')) | ->setTitle(pht('No Such Account')) | ||||
->appendChild( | ->appendChild( | ||||
pht( | pht( | ||||
"You can not unlink this account because it is not linked.")) | 'You can not unlink this account because it is not linked.')) | ||||
->addCancelButton($this->getDoneURI()); | ->addCancelButton($this->getDoneURI()); | ||||
return id(new AphrontDialogResponse())->setDialog($dialog); | return id(new AphrontDialogResponse())->setDialog($dialog); | ||||
} | } | ||||
private function renderNotUnlinkableErrorDialog( | private function renderNotUnlinkableErrorDialog( | ||||
PhabricatorAuthProvider $provider) { | PhabricatorAuthProvider $provider) { | ||||
$dialog = id(new AphrontDialogView()) | $dialog = id(new AphrontDialogView()) | ||||
->setUser($this->getRequest()->getUser()) | ->setUser($this->getRequest()->getUser()) | ||||
->setTitle(pht('Permanent Account Link')) | ->setTitle(pht('Permanent Account Link')) | ||||
->appendChild( | ->appendChild( | ||||
pht( | pht( | ||||
"You can not unlink this account because the administrator has ". | 'You can not unlink this account because the administrator has '. | ||||
"configured Phabricator to make links to %s accounts permanent.", | 'configured Phabricator to make links to %s accounts permanent.', | ||||
$provider->getProviderName())) | $provider->getProviderName())) | ||||
->addCancelButton($this->getDoneURI()); | ->addCancelButton($this->getDoneURI()); | ||||
return id(new AphrontDialogResponse())->setDialog($dialog); | return id(new AphrontDialogResponse())->setDialog($dialog); | ||||
} | } | ||||
private function renderLastUsableAccountErrorDialog() { | private function renderLastUsableAccountErrorDialog() { | ||||
$dialog = id(new AphrontDialogView()) | $dialog = id(new AphrontDialogView()) | ||||
->setUser($this->getRequest()->getUser()) | ->setUser($this->getRequest()->getUser()) | ||||
->setTitle(pht('Last Valid Account')) | ->setTitle(pht('Last Valid Account')) | ||||
->appendChild( | ->appendChild( | ||||
pht( | pht( | ||||
"You can not unlink this account because you have no other ". | 'You can not unlink this account because you have no other '. | ||||
"valid login accounts. If you removed it, you would be unable ". | 'valid login accounts. If you removed it, you would be unable '. | ||||
"to login. Add another authentication method before removing ". | 'to login. Add another authentication method before removing '. | ||||
"this one.")) | 'this one.')) | ||||
->addCancelButton($this->getDoneURI()); | ->addCancelButton($this->getDoneURI()); | ||||
return id(new AphrontDialogResponse())->setDialog($dialog); | return id(new AphrontDialogResponse())->setDialog($dialog); | ||||
} | } | ||||
private function renderConfirmDialog() { | private function renderConfirmDialog() { | ||||
$provider_key = $this->providerKey; | $provider_key = $this->providerKey; | ||||
$provider = PhabricatorAuthProvider::getEnabledProviderByKey($provider_key); | $provider = PhabricatorAuthProvider::getEnabledProviderByKey($provider_key); | ||||
Show All 25 Lines |