mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-15 06:03:50 +01:00
make tests for ldap more specific to not be fooled by Mocks
This commit is contained in:
parent
3555a659ec
commit
27a0c21c38
1 changed files with 3 additions and 3 deletions
|
@ -58,7 +58,7 @@ class AuthHandler(BaseHandler):
|
||||||
self.ldap_email_property = hs.config.ldap_email_property
|
self.ldap_email_property = hs.config.ldap_email_property
|
||||||
self.ldap_full_name_property = hs.config.ldap_full_name_property
|
self.ldap_full_name_property = hs.config.ldap_full_name_property
|
||||||
|
|
||||||
if self.ldap_enabled:
|
if self.ldap_enabled is True:
|
||||||
import ldap
|
import ldap
|
||||||
logger.info("Import ldap version: %s", ldap.__version__)
|
logger.info("Import ldap version: %s", ldap.__version__)
|
||||||
|
|
||||||
|
@ -444,8 +444,8 @@ class AuthHandler(BaseHandler):
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def _check_ldap_password(self, user_id, password):
|
def _check_ldap_password(self, user_id, password):
|
||||||
if not self.ldap_enabled:
|
if self.ldap_enabled is not True:
|
||||||
logger.info("LDAP not configured")
|
logger.debug("LDAP not configured")
|
||||||
defer.returnValue(False)
|
defer.returnValue(False)
|
||||||
|
|
||||||
import ldap
|
import ldap
|
||||||
|
|
Loading…
Reference in a new issue