Differential D21778 Diff 51915 src/applications/auth/controller/config/PhabricatorAuthDisableController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/controller/config/PhabricatorAuthDisableController.php
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | if ($request->isDialogFormPost()) { | ||||
return id(new AphrontRedirectResponse())->setURI($done_uri); | return id(new AphrontRedirectResponse())->setURI($done_uri); | ||||
} | } | ||||
if ($is_enable) { | if ($is_enable) { | ||||
$title = pht('Enable Provider?'); | $title = pht('Enable Provider?'); | ||||
if ($config->getShouldAllowRegistration()) { | if ($config->getShouldAllowRegistration()) { | ||||
$body = pht( | $body = pht( | ||||
'Do you want to enable this provider? Users will be able to use '. | 'Do you want to enable this provider? Users will be able to use '. | ||||
'their existing external accounts to register new Phabricator '. | 'their existing external accounts to register new accounts and '. | ||||
'accounts and log in using linked accounts.'); | 'log in using linked accounts.'); | ||||
} else { | } else { | ||||
$body = pht( | $body = pht( | ||||
'Do you want to enable this provider? Users will be able to log '. | 'Do you want to enable this provider? Users will be able to log '. | ||||
'in to Phabricator using linked accounts.'); | 'in using linked accounts.'); | ||||
} | } | ||||
$button = pht('Enable Provider'); | $button = pht('Enable Provider'); | ||||
} else { | } else { | ||||
// TODO: We could tailor this a bit more. In particular, we could | // TODO: We could tailor this a bit more. In particular, we could | ||||
// check if this is the last provider and either prevent if from | // check if this is the last provider and either prevent if from | ||||
// being disabled or force the user through like 35 prompts. We could | // being disabled or force the user through like 35 prompts. We could | ||||
// also check if it's the last provider linked to the acting user's | // also check if it's the last provider linked to the acting user's | ||||
// account and pop a warning like "YOU WILL NO LONGER BE ABLE TO LOGIN | // account and pop a warning like "YOU WILL NO LONGER BE ABLE TO LOGIN | ||||
Show All 24 Lines |