Merge branch 'master' into 'master'
Add support for paged results LdapUserDir now accepts a new parameter 'page_size', which specifies how many results should be retrieved at a time (default: 500). A page size of 0 disables paged results. See merge request !1
This commit is contained in:
@@ -110,12 +110,14 @@ class LdapUserDir(object):
|
||||
|
||||
@staticmethod
|
||||
def has_dn_format(name):
|
||||
"""returns true if name has the format of a distinguished name
|
||||
"""Returns true iff name has the format of a distinguished name
|
||||
"""
|
||||
# currently we are satisfied with a very primitive check
|
||||
if ',' in name:
|
||||
try:
|
||||
ldap.explode_dn(name)
|
||||
except Exception:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
return False
|
||||
|
||||
@staticmethod
|
||||
def dn_to_cn(dn):
|
||||
|
||||
Reference in New Issue
Block a user