1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00

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:
epriestley 2013-06-20 14:04:20 -07:00
parent 0bffb8cd21
commit 052193ce2d

View file

@ -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()) {