This is an automated email from the git hooks/post-receive script. osallou pushed a commit to branch upstream in repository biomaj3-user.
commit 0c3263334f026780a79ed252b6b9e001a44b3a50 Author: Olivier Sallou <[email protected]> Date: Thu Aug 17 09:59:02 2017 +0000 New upstream version 3.0.6 --- CHANGES.txt | 2 ++ biomaj_user/user.py | 18 +++++++++--------- requirements.txt | 2 +- setup.py | 6 +++--- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 70ce365..bbfeae1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,5 @@ +3.0.6: + update ldap3 requirement version to use more recent release 3.0.5: fix ldap authentication 3.0.4: diff --git a/biomaj_user/user.py b/biomaj_user/user.py index 626b9af..bd6cece 100644 --- a/biomaj_user/user.py +++ b/biomaj_user/user.py @@ -40,12 +40,12 @@ class BmajUser(object): con = None if not self.user and BmajUser.config['ldap']['host']: # Check if in ldap - from ldap3 import Server, Connection, STRATEGY_SYNC, SEARCH_SCOPE_WHOLE_SUBTREE, GET_ALL_INFO + from ldap3 import Server, Connection, SYNC, SUBTREE, ALL try: ldap_host = BmajUser.config['ldap']['host'] ldap_port = BmajUser.config['ldap']['port'] - ldap_server = Server(ldap_host, port=ldap_port, get_info=GET_ALL_INFO) - con = Connection(ldap_server, auto_bind=True, client_strategy=STRATEGY_SYNC, check_names=True) + ldap_server = Server(ldap_host, port=ldap_port, get_info=ALL) + con = Connection(ldap_server, auto_bind=True, client_strategy=SYNC, check_names=True) except Exception as err: logging.error(str(err)) self.user = None @@ -54,7 +54,7 @@ class BmajUser(object): ldapfilter = "(&(|(uid=" + user + ")(mail=" + user + ")))" try: attrs = ['mail'] - con.search(base_dn, ldapfilter, SEARCH_SCOPE_WHOLE_SUBTREE, attributes=attrs) + con.search(base_dn, ldapfilter, SUBTREE, attributes=attrs) if con.response: ldapMail = None for r in con.response: @@ -117,13 +117,13 @@ class BmajUser(object): con = None ldap_server = None - from ldap3 import Server, Connection, AUTH_SIMPLE, STRATEGY_SYNC, SEARCH_SCOPE_WHOLE_SUBTREE, GET_ALL_INFO + from ldap3 import Server, Connection, SIMPLE, SYNC, SUBTREE, ALL from ldap3.core.exceptions import LDAPBindError try: ldap_host = BmajUser.config['ldap']['host'] ldap_port = BmajUser.config['ldap']['port'] - ldap_server = Server(ldap_host, port=ldap_port, get_info=GET_ALL_INFO) - con = Connection(ldap_server, auto_bind=True, client_strategy=STRATEGY_SYNC, check_names=True) + ldap_server = Server(ldap_host, port=ldap_port, get_info=ALL) + con = Connection(ldap_server, auto_bind=True, client_strategy=SYNC, check_names=True) except Exception as err: logging.error(str(err)) return False @@ -133,7 +133,7 @@ class BmajUser(object): try: attrs = ['mail'] - con.search(base_dn, ldapfilter, SEARCH_SCOPE_WHOLE_SUBTREE, attributes=attrs) + con.search(base_dn, ldapfilter, SUBTREE, attributes=attrs) user_dn = None # ldapMail = None # ldapHomeDirectory = None @@ -142,7 +142,7 @@ class BmajUser(object): # ldapMail = r['attributes']['mail'][0] con.unbind() - con = Connection(ldap_server, auto_bind=True, read_only=True, client_strategy=STRATEGY_SYNC, user=user_dn, password=password, authentication=AUTH_SIMPLE, check_names=True) + con = Connection(ldap_server, auto_bind=True, read_only=True, client_strategy=SYNC, user=user_dn, password=password, authentication=SIMPLE, check_names=True) con.unbind() if user_dn: diff --git a/requirements.txt b/requirements.txt index 681d030..208de5b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ biomaj_core nose mock -ldap3==1.4.0 +ldap3>=2.2.4 pymongo py-bcrypt flask diff --git a/setup.py b/setup.py index 48a6d78..eec89c5 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ config = { 'url': 'http://biomaj.genouest.org', 'download_url': 'http://biomaj.genouest.org', 'author_email': '[email protected]', - 'version': '3.0.5', + 'version': '3.0.6', 'classifiers': [ # How mature is this project? Common values are # 3 - Alpha @@ -44,11 +44,11 @@ config = { 'Programming Language :: Python :: 3.4' ], 'install_requires': [ - 'ldap3==1.4.0', + 'ldap3>=2.2.4', 'pymongo', 'py-bcrypt', 'flask', - 'PyYAML', + 'PyYAML', 'tabulate', 'python-consul', 'biomaj_core' -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/biomaj3-user.git _______________________________________________ debian-med-commit mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
