Page MenuHomePhabricator

D8395.id19951.diff
No OneTemporary

D8395.id19951.diff

Index: src/applications/config/check/PhabricatorSetupCheckAuth.php
===================================================================
--- src/applications/config/check/PhabricatorSetupCheckAuth.php
+++ src/applications/config/check/PhabricatorSetupCheckAuth.php
@@ -3,8 +3,22 @@
final class PhabricatorSetupCheckAuth extends PhabricatorSetupCheck {
protected function executeChecks() {
- $providers = PhabricatorAuthProvider::getAllEnabledProviders();
- if (!$providers) {
+ // NOTE: We're not actually building these providers. Building providers
+ // can require additional configuration to be present (e.g., to build
+ // redirect and login URIs using `phabricator.base-uri`) and it won't
+ // necessarily be available when running setup checks.
+
+ // Since this check is only meant as a hint to new administrators about
+ // steps they should take, we don't need to be thorough about checking
+ // that providers are enabled, available, correctly configured, etc. As
+ // long as they've created some kind of provider in the auth app before,
+ // they know that it exists and don't need the hint to go check it out.
+
+ $configs = id(new PhabricatorAuthProviderConfigQuery())
+ ->setViewer(PhabricatorUser::getOmnipotentUser())
+ ->execute();
+
+ if (!$configs) {
$message = pht(
'You have not configured any authentication providers yet. You '.
'should add a provider (like username/password, LDAP, or GitHub '.

File Metadata

Mime Type
text/plain
Expires
Thu, Oct 24, 3:52 AM (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6731581
Default Alt Text
D8395.id19951.diff (1 KB)

Event Timeline