Improve /auth/ behavior when a provider implementation is missing
Summary: Ref T1536. This "should never happen", but can if you're developing custom providers. Improve the robustness of this interface in the presence of missing provider implementations.
Test Plan: {F47008}
Reviewers: chad, btrahan
Reviewed By: chad
CC: aran
Maniphest Tasks: T1536
Differential Revision: https://secure.phabricator.com/D6253
This commit is contained in:
@@ -25,17 +25,25 @@ final class PhabricatorAuthListController
|
|||||||
if ($provider) {
|
if ($provider) {
|
||||||
$name = $provider->getProviderName();
|
$name = $provider->getProviderName();
|
||||||
} else {
|
} else {
|
||||||
$name = $config->getProviderType();
|
$name = $config->getProviderType().' ('.$config->getProviderClass().')';
|
||||||
}
|
}
|
||||||
|
|
||||||
$item
|
$item
|
||||||
->setHeader($name)
|
->setHeader($name);
|
||||||
->setHref($edit_uri);
|
|
||||||
|
|
||||||
|
if ($provider) {
|
||||||
|
$item->setHref($edit_uri);
|
||||||
|
} else {
|
||||||
|
$item->addAttribute(pht('Provider Implementation Missing!'));
|
||||||
|
}
|
||||||
|
|
||||||
|
$domain = null;
|
||||||
|
if ($provider) {
|
||||||
$domain = $provider->getProviderDomain();
|
$domain = $provider->getProviderDomain();
|
||||||
if ($domain !== 'self') {
|
if ($domain !== 'self') {
|
||||||
$item->addAttribute($domain);
|
$item->addAttribute($domain);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($config->getShouldAllowRegistration()) {
|
if ($config->getShouldAllowRegistration()) {
|
||||||
$item->addAttribute(pht('Allows Registration'));
|
$item->addAttribute(pht('Allows Registration'));
|
||||||
|
|||||||
Reference in New Issue
Block a user