Skip to content

Commit

Permalink
Fix LDAP_GLOBAL_OPTIONS.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Skiepko committed May 16, 2017
1 parent 1755bc4 commit cfc0889
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Changelog for dila
0.4.3 (unreleased)
------------------

- Nothing changed yet.
- Fix LDAP\_GLOBAL\_OPTIONS.


0.4.2 (2017-05-16)
Expand Down
4 changes: 2 additions & 2 deletions dila/application/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ def get_user_records(username):
def initialize_connection():
connection = ldap.initialize(config.LDAP_SERVER_URI)
connection.protocol_version = ldap.VERSION3
if config.LDAP_START_TLS:
connection.start_tls_s()
for key, value in config.LDAP_GLOBAL_OPTIONS.items():
connection.set_option(key, value)
if config.LDAP_START_TLS:
connection.start_tls_s()
yield connection
connection.unbind_s()

0 comments on commit cfc0889

Please sign in to comment.