mirror of
https://github.com/ansible/awx.git
synced 2026-03-03 17:51:06 -03:30
ldap attributes filter in user_groups()
ldap search currently fetches ALL attributes which is a waste of bandwidth resources and woefully slow on large ldap groups when it only needs to parse the name_attr Signed-off-by: Jijo Varghese <jijojv@gmail.com>
This commit is contained in:
committed by
Bill Nottingham
parent
b07e44ad69
commit
e1dde21ec3
@@ -42,6 +42,7 @@ class PosixUIDGroupType(LDAPGroupType):
|
||||
)
|
||||
|
||||
search = group_search.search_with_additional_term_string(filterstr)
|
||||
search.attrlist = [self.name_attr]
|
||||
groups = search.execute(ldap_user.connection)
|
||||
except (KeyError, IndexError):
|
||||
pass
|
||||
@@ -72,4 +73,3 @@ class PosixUIDGroupType(LDAPGroupType):
|
||||
is_member = False
|
||||
|
||||
return is_member
|
||||
|
||||
|
||||
Reference in New Issue
Block a user