Commit d453bd9b authored by Benjamin "Ziirish" SANS's avatar Benjamin "Ziirish" SANS

Merge branch 'fix-ldap' into 'master'

Fix ldap

See merge request !102
parents b854b76c de53553a
Pipeline #1560 passed with stage
in 1 minute and 54 seconds
...@@ -307,6 +307,11 @@ class UserHandler(BUIuser): ...@@ -307,6 +307,11 @@ class UserHandler(BUIuser):
self.back = None self.back = None
return self.login(passwd) return self.login(passwd)
self.authenticated = self.real.login(passwd) self.authenticated = self.real.login(passwd)
# allow to try another backend
if not self.authenticated:
self.real = None
self.back = None
return self.login(passwd)
session['authenticated'] = self.authenticated session['authenticated'] = self.authenticated
session['language'] = self.language session['language'] = self.language
session['login'] = self.name session['login'] = self.name
......
...@@ -29,7 +29,7 @@ class LdapLoader(BUIloader): ...@@ -29,7 +29,7 @@ class LdapLoader(BUIloader):
conf = self.app.conf conf = self.app.conf
handler.name = self.name handler.name = self.name
defaults = { defaults = {
'LDAP': { 'LDAP:AUTH': {
'host': 'localhost', 'host': 'localhost',
'port': None, 'port': None,
'encryption': None, 'encryption': None,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment