mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-14 10:52:41 +01:00
32f6c88896
Summary: Ref T1536. Currently, when you install Phabricator you're dumped on the login screen and have to consult the documentation to learn about `bin/accountadmin`. Instead, detect that an install is running first-time setup: - It has no configured providers; and - it has no user accounts. We can safely deduce that such an install isn't configured yet, and let the user create an admin account from the web UI. After they login, we raise a setup issue and lead them to configure authentication. (This could probably use some UI and copy tweaks.) Test Plan: {F46738} {F46739} Reviewers: chad, btrahan Reviewed By: chad CC: aran Maniphest Tasks: T1536 Differential Revision: https://secure.phabricator.com/D6228
27 lines
839 B
PHP
27 lines
839 B
PHP
<?php
|
|
|
|
final class PhabricatorSetupCheckAuth extends PhabricatorSetupCheck {
|
|
|
|
protected function executeChecks() {
|
|
$providers = PhabricatorAuthProvider::getAllEnabledProviders();
|
|
if (!$providers) {
|
|
$message = pht(
|
|
'You have not configured any authentication providers yet. You '.
|
|
'should add a provider (like username/password, LDAP, or GitHub '.
|
|
'OAuth) so users can register and log in. You can add and configure '.
|
|
'providers %s.',
|
|
phutil_tag(
|
|
'a',
|
|
array(
|
|
'href' => '/auth/',
|
|
),
|
|
pht('using the "Auth" application')));
|
|
|
|
$this
|
|
->newIssue('auth.noproviders')
|
|
->setShortName(pht('No Auth Providers'))
|
|
->setName(pht('No Authentication Providers Configured'))
|
|
->setMessage($message);
|
|
}
|
|
}
|
|
}
|