Skip to content
Snippets Groups Projects
Unverified Commit 4b5bd5c6 authored by Alexandre Ferland's avatar Alexandre Ferland Committed by GitHub
Browse files

Merge pull request #52 from sylwit/patch-1

Bind ldap to current app
parents c366be4c 151d8de5
Branches
Tags
No related merge requests found
...@@ -76,6 +76,9 @@ class LDAP(object): ...@@ -76,6 +76,9 @@ class LDAP(object):
if app.config['LDAP_{0}'.format(option)] is None: if app.config['LDAP_{0}'.format(option)] is None:
raise LDAPException('LDAP_{0} cannot be None!'.format(option)) raise LDAPException('LDAP_{0} cannot be None!'.format(option))
# Bind LDAP to app
app.ldap = self
@staticmethod @staticmethod
def _set_custom_options(conn): def _set_custom_options(conn):
options = current_app.config['LDAP_CUSTOM_OPTIONS'] options = current_app.config['LDAP_CUSTOM_OPTIONS']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment