improved ldap_auth, thanks Gyuris
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 1.99.4 (2012-03-01 08:54:35) stable
|
Version 1.99.4 (2012-03-01 09:12:01) stable
|
||||||
|
|||||||
@@ -201,8 +201,6 @@ def ldap_auth( server = 'ldap', port = None,
|
|||||||
|
|
||||||
return True
|
return True
|
||||||
except ldap.LDAPError, e:
|
except ldap.LDAPError, e:
|
||||||
import traceback
|
|
||||||
logging.error( traceback.format_exc() )
|
|
||||||
return False
|
return False
|
||||||
except IndexError, ex: # for AD membership test
|
except IndexError, ex: # for AD membership test
|
||||||
return False
|
return False
|
||||||
@@ -265,6 +263,8 @@ def ldap_auth( server = 'ldap', port = None,
|
|||||||
group = group_row[1]
|
group = group_row[1]
|
||||||
ldap_groups_of_the_user.extend( group[group_name_attrib] )
|
ldap_groups_of_the_user.extend( group[group_name_attrib] )
|
||||||
|
|
||||||
|
con.unbind()
|
||||||
|
|
||||||
#
|
#
|
||||||
# Get all group name where the user is in actually in local db
|
# Get all group name where the user is in actually in local db
|
||||||
# #############################################################
|
# #############################################################
|
||||||
|
|||||||
Reference in New Issue
Block a user