Differential D21778 Diff 51915 src/applications/auth/guidance/PhabricatorAuthProvidersGuidanceEngineExtension.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/guidance/PhabricatorAuthProvidersGuidanceEngineExtension.php
Show All 36 Lines | public function generateGuidance(PhabricatorGuidanceContext $context) { | ||||
$approval_key = 'auth.require-approval'; | $approval_key = 'auth.require-approval'; | ||||
$approval_link = $this->renderConfigLink($approval_key); | $approval_link = $this->renderConfigLink($approval_key); | ||||
$approval_value = PhabricatorEnv::getEnvConfig($approval_key); | $approval_value = PhabricatorEnv::getEnvConfig($approval_key); | ||||
$results = array(); | $results = array(); | ||||
if ($domains_value) { | if ($domains_value) { | ||||
$message = pht( | $message = pht( | ||||
'Phabricator is configured with an email domain whitelist (in %s), so '. | 'This server is configured with an email domain whitelist (in %s), so '. | ||||
'only users with a verified email address at one of these %s '. | 'only users with a verified email address at one of these %s '. | ||||
'allowed domain(s) will be able to register an account: %s', | 'allowed domain(s) will be able to register an account: %s', | ||||
$domains_link, | $domains_link, | ||||
phutil_count($domains_value), | phutil_count($domains_value), | ||||
phutil_tag('strong', array(), implode(', ', $domains_value))); | phutil_tag('strong', array(), implode(', ', $domains_value))); | ||||
$results[] = $this->newGuidance('core.auth.email-domains.on') | $results[] = $this->newGuidance('core.auth.email-domains.on') | ||||
->setMessage($message); | ->setMessage($message); | ||||
} else { | } else { | ||||
$message = pht( | $message = pht( | ||||
'Anyone who can browse to this Phabricator install will be able to '. | 'Anyone who can browse to this this server will be able to '. | ||||
'register an account. To add email domain restrictions, configure '. | 'register an account. To add email domain restrictions, configure '. | ||||
'%s.', | '%s.', | ||||
$domains_link); | $domains_link); | ||||
$results[] = $this->newGuidance('core.auth.email-domains.off') | $results[] = $this->newGuidance('core.auth.email-domains.off') | ||||
->setMessage($message); | ->setMessage($message); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |