mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 23:02:42 +01:00
Extract ldap auth from password auth completely
This commit is contained in:
parent
bedc9acf98
commit
e683236793
1 changed files with 24 additions and 23 deletions
|
@ -77,14 +77,14 @@ final class PhabricatorLoginController
|
||||||
|
|
||||||
$password_auth = PhabricatorEnv::getEnvConfig('auth.password-auth-enabled');
|
$password_auth = PhabricatorEnv::getEnvConfig('auth.password-auth-enabled');
|
||||||
|
|
||||||
$forms = array();
|
$username_or_email = $request->getCookie('phusr');
|
||||||
|
|
||||||
|
$forms = array();
|
||||||
|
|
||||||
$errors = array();
|
$errors = array();
|
||||||
if ($password_auth) {
|
if ($password_auth) {
|
||||||
$require_captcha = false;
|
$require_captcha = false;
|
||||||
$e_captcha = true;
|
$e_captcha = true;
|
||||||
$username_or_email = $request->getCookie('phusr');
|
|
||||||
if ($request->isFormPost()) {
|
if ($request->isFormPost()) {
|
||||||
|
|
||||||
if (AphrontFormRecaptchaControl::isRecaptchaEnabled()) {
|
if (AphrontFormRecaptchaControl::isRecaptchaEnabled()) {
|
||||||
|
@ -188,6 +188,8 @@ final class PhabricatorLoginController
|
||||||
// $panel->setCreateButton('Register New Account', '/login/register/');
|
// $panel->setCreateButton('Register New Account', '/login/register/');
|
||||||
$forms['Phabricator Login'] = $form;
|
$forms['Phabricator Login'] = $form;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
$ldap_provider = new PhabricatorLDAPProvider();
|
$ldap_provider = new PhabricatorLDAPProvider();
|
||||||
if ($ldap_provider->isProviderEnabled()) {
|
if ($ldap_provider->isProviderEnabled()) {
|
||||||
$ldap_form = new AphrontFormView();
|
$ldap_form = new AphrontFormView();
|
||||||
|
@ -211,7 +213,6 @@ final class PhabricatorLoginController
|
||||||
|
|
||||||
$forms['LDAP Login'] = $ldap_form;
|
$forms['LDAP Login'] = $ldap_form;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$providers = PhabricatorOAuthProvider::getAllProviders();
|
$providers = PhabricatorOAuthProvider::getAllProviders();
|
||||||
foreach ($providers as $provider) {
|
foreach ($providers as $provider) {
|
||||||
|
|
Loading…
Reference in a new issue