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

Merge pull request #71 from DanWertheimer/master

updated to get proper groups
parents 9c6cb356 94499517
No related branches found
No related tags found
No related merge requests found
...@@ -232,8 +232,11 @@ class LDAP(object): ...@@ -232,8 +232,11 @@ class LDAP(object):
if current_app.config['LDAP_OPENLDAP']: if current_app.config['LDAP_OPENLDAP']:
group_member_filter = \ group_member_filter = \
current_app.config['LDAP_GROUP_MEMBER_FILTER_FIELD'] current_app.config['LDAP_GROUP_MEMBER_FILTER_FIELD']
groups = [record[1][group_member_filter][0].decode( record_list = [record[1] for record in records]
'utf-8') for record in records] record_dicts = [
record for record in record_list if isinstance(record, dict)]
groups = [item.get([group_member_filter][0])[0]
for item in record_dicts]
return groups return groups
else: else:
if current_app.config['LDAP_USER_GROUPS_FIELD'] in \ if current_app.config['LDAP_USER_GROUPS_FIELD'] in \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment