mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Remove trailing whitespaces
Remove trailing whitespaces, change line 345 from 'if' to 'elif'
This commit is contained in:
parent
32f906b020
commit
b5b2e7e097
1 changed files with 5 additions and 5 deletions
|
@ -341,14 +341,14 @@ def groups(username, **kwargs):
|
|||
if 'cn' in entry:
|
||||
group_list.append(entry['cn'][0])
|
||||
log.debug('User {0} is a member of groups: {1}'.format(username, group_list))
|
||||
|
||||
if _config('freeipa'):
|
||||
|
||||
elif _config('freeipa'):
|
||||
escaped_username = ldap.filter.escape_filter_chars(username)
|
||||
search_base = _config('group_basedn')
|
||||
search_string = _render_template(_config('group_filter'), escaped_username)
|
||||
search_results = bind.search_s(search_base,
|
||||
ldap.SCOPE_SUBTREE,
|
||||
search_string,
|
||||
search_results = bind.search_s(search_base,
|
||||
ldap.SCOPE_SUBTREE,
|
||||
search_string,
|
||||
[_config('accountattributename'), 'cn'])
|
||||
|
||||
for entry, result in search_results:
|
||||
|
|
Loading…
Add table
Reference in a new issue