1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 01:02:42 +01:00

Don't show an auth provider as enabled if it's still being created

Test Plan: attempted to create a new auth provider; observed that "enabled" ui element does not render. viewed existing auth provider and observed that "enabled" ui element still renders

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T12245

Differential Revision: https://secure.phabricator.com/D17337
This commit is contained in:
Austin McKinley 2017-02-13 07:02:11 -08:00 committed by epriestley
parent b71e089669
commit 8dd7b544fe

View file

@ -191,16 +191,18 @@ final class PhabricatorAuthEditController
->setHeader(pht('%s: %s', $title, $provider->getProviderName())) ->setHeader(pht('%s: %s', $title, $provider->getProviderName()))
->setHeaderIcon($header_icon); ->setHeaderIcon($header_icon);
if ($config->getIsEnabled()) { if (!$is_new) {
$status_name = pht('Enabled'); if ($config->getIsEnabled()) {
$status_color = 'green'; $status_name = pht('Enabled');
$status_icon = 'fa-check'; $status_color = 'green';
$header->setStatus($status_icon, $status_color, $status_name); $status_icon = 'fa-check';
} else if (!$is_new) { $header->setStatus($status_icon, $status_color, $status_name);
$status_name = pht('Disabled'); } else {
$status_color = 'indigo'; $status_name = pht('Disabled');
$status_icon = 'fa-ban'; $status_color = 'indigo';
$header->setStatus($status_icon, $status_color, $status_name); $status_icon = 'fa-ban';
$header->setStatus($status_icon, $status_color, $status_name);
}
} }
$config_name = 'auth.email-domains'; $config_name = 'auth.email-domains';