mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
LDAP connection bugfix
This commit is contained in:
parent
4618264c86
commit
97de68996a
1 changed files with 3 additions and 2 deletions
|
@ -289,13 +289,14 @@ class YunoHostLDAP(Singleton):
|
|||
else:
|
||||
need_password = False
|
||||
|
||||
self.level = self.level+1
|
||||
try:
|
||||
self.conn.simple_bind_s('cn=admin,' + self.base, self.pwd)
|
||||
self.connected = True
|
||||
except ldap.INVALID_CREDENTIALS:
|
||||
raise YunoHostError(13, _('Invalid credentials'))
|
||||
|
||||
self.level = self.level+1
|
||||
|
||||
def __exit__(self, type, value, traceback):
|
||||
self.level = self.level-1
|
||||
if self.level == 0:
|
||||
|
|
Loading…
Reference in a new issue