mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-22 21:40:55 +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:
parent
0bffb8cd21
commit
052193ce2d
1 changed files with 14 additions and 6 deletions
|
@ -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()) {
|
||||
|
|
Loading…
Reference in a new issue