mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Fix postinstall
This commit is contained in:
parent
ef50e8bf49
commit
c6806af2ee
1 changed files with 2 additions and 5 deletions
|
@ -94,11 +94,8 @@ class Authenticator(BaseAuthenticator):
|
||||||
logger.warning("Error during ldap authentication process: %s", e)
|
logger.warning("Error during ldap authentication process: %s", e)
|
||||||
raise
|
raise
|
||||||
else:
|
else:
|
||||||
# If we are trying to login with SASL, we must be logged in as admin
|
# FIXME: During SASL bind whoami from the test server return the admindn while userdn is returned normally :
|
||||||
if self.sasldn in self.userdn and who != self.admincn:
|
if not (who == self.admindn or who == self.userdn):
|
||||||
raise MoulinetteError("Not logged in with the expected userdn ?!")
|
|
||||||
# else if the userdn must be the same as the identity
|
|
||||||
elif self.sasldn not in self.userdn and who != self.userdn:
|
|
||||||
raise MoulinetteError("Not logged in with the expected userdn ?!")
|
raise MoulinetteError("Not logged in with the expected userdn ?!")
|
||||||
else:
|
else:
|
||||||
self.con = con
|
self.con = con
|
||||||
|
|
Loading…
Reference in a new issue