Skip to content

Commit 052193c

Browse files
author
epriestley
committed
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
1 parent 0bffb8c commit 052193c

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

src/applications/auth/controller/config/PhabricatorAuthListController.php

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,24 @@ public function processRequest() {
2525
if ($provider) {
2626
$name = $provider->getProviderName();
2727
} else {
28-
$name = $config->getProviderType();
28+
$name = $config->getProviderType().' ('.$config->getProviderClass().')';
2929
}
3030

3131
$item
32-
->setHeader($name)
33-
->setHref($edit_uri);
32+
->setHeader($name);
3433

35-
$domain = $provider->getProviderDomain();
36-
if ($domain !== 'self') {
37-
$item->addAttribute($domain);
34+
if ($provider) {
35+
$item->setHref($edit_uri);
36+
} else {
37+
$item->addAttribute(pht('Provider Implementation Missing!'));
38+
}
39+
40+
$domain = null;
41+
if ($provider) {
42+
$domain = $provider->getProviderDomain();
43+
if ($domain !== 'self') {
44+
$item->addAttribute($domain);
45+
}
3846
}
3947

4048
if ($config->getShouldAllowRegistration()) {

0 commit comments

Comments
 (0)