fixed Issue 1414:Error with ldap_auth and using allowed_groups against AD 2008, thnaks Peter Gastinger

This commit is contained in:
mdipierro
2013-04-01 12:45:09 -05:00
parent 359758804b
commit 6ac38e7c56
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.4.5-stable+timestamp.2013.04.01.09.31.59
Version 2.4.5-stable+timestamp.2013.04.01.12.44.20
+2 -1
View File
@@ -653,7 +653,8 @@ def ldap_auth(server='ldap', port=None,
ldap_groups_of_the_user = list()
for group_row in group_search_result:
group = group_row[1]
ldap_groups_of_the_user.extend(group[group_name_attrib])
if type(group) == dict and group.has_key(group_name_attrib):
ldap_groups_of_the_user.extend(group[group_name_attrib])
con.unbind()
logger.debug('User groups: %s' % ldap_groups_of_the_user)