Fix issue causing automated tests to fail.

This commit is contained in:
C. R. Oldham 2016-03-19 14:21:00 -06:00
parent eb139ab935
commit 4af4280d04
2 changed files with 5 additions and 5 deletions

View File

@ -392,7 +392,7 @@ def expand_ldap_entries(entries, opts=None):
This function only gets called if auth.ldap.activedirectory = True
'''
bind = _bind_for_search(opts=opts)
acl_tree = {}
acl_tree = []
for user_or_group_dict in entries:
for minion_or_ou, matchers in six.iteritems(user_or_group_dict):
permissions = matchers
@ -411,11 +411,11 @@ def expand_ldap_entries(entries, opts=None):
retrieved_minion_ids.append(minion_id)
for minion_id in retrieved_minion_ids:
acl_tree[minion_id] = permissions
acl_tree.append({minion_id: permissions})
except ldap.NO_SUCH_OBJECT:
pass
else:
acl_tree[minion_or_ou] = matchers
acl_tree.append({minion_or_ou: matchers})
log.trace('expand_ldap_entries: {0}'.format(acl_tree))
return acl_tree

View File

@ -1969,7 +1969,6 @@ class ClearFuncs(object):
# Add any add'l permissions allowed by group membership
if group_auth_match:
auth_list = self.ckminions.fill_auth_list_from_groups(eauth_config, token['groups'], auth_list)
auth_list = self.ckminions.fill_auth_list_from_ou(auth_list, self.opts)
log.trace("Compiled auth_list: {0}".format(auth_list))
@ -2066,7 +2065,8 @@ class ClearFuncs(object):
self.opts['external_auth'][extra['eauth']],
groups,
auth_list)
auth_list = self.ckminions.fill_auth_list_from_ou(auth_list, self.opts)
if extra['eauth'] == 'ldap':
auth_list = self.ckminions.fill_auth_list_from_ou(auth_list, self.opts)
good = self.ckminions.auth_check(
auth_list,
clear_load['fun'],