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,16 +25,24 @@ final class PhabricatorAuthListController
|
||||
if ($provider) {
|
||||
$name = $provider->getProviderName();
|
||||
} else {
|
||||
$name = $config->getProviderType();
|
||||
$name = $config->getProviderType().' ('.$config->getProviderClass().')';
|
||||
}
|
||||
|
||||
$item
|
||||
->setHeader($name)
|
||||
->setHref($edit_uri);
|
||||
->setHeader($name);
|
||||
|
||||
$domain = $provider->getProviderDomain();
|
||||
if ($domain !== 'self') {
|
||||
$item->addAttribute($domain);
|
||||
if ($provider) {
|
||||
$item->setHref($edit_uri);
|
||||
} else {
|
||||
$item->addAttribute(pht('Provider Implementation Missing!'));
|
||||
}
|
||||
|
||||
$domain = null;
|
||||
if ($provider) {
|
||||
$domain = $provider->getProviderDomain();
|
||||
if ($domain !== 'self') {
|
||||
$item->addAttribute($domain);
|
||||
}
|
||||
}
|
||||
|
||||
if ($config->getShouldAllowRegistration()) {
|
||||
|
||||
Reference in New Issue
Block a user