Fixes #6178: Properly use ldap settings (#6179)

This commit is contained in:
Daniel Morlock 2018-10-02 07:16:29 +02:00 committed by Rushabh Mehta
parent 767814c511
commit 62abb3f8a0

View file

@ -86,7 +86,7 @@ def authenticate_ldap_user(user=None, password=None):
try:
try:
# set TLS settings for secure connection
if self.ssl_tls_mode == 'StartTLS':
if settings.ssl_tls_mode == 'StartTLS':
conn.set_option(ldap.OPT_X_TLS_DEMAND, True)
if self.require_trusted_certificate == 'Yes':
conn.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_DEMAND)