1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-11-25 10:44:30 +01:00

fix in get_roles

This commit is contained in:
kakwa 2015-05-16 19:11:52 +02:00
parent 3889a441a3
commit ab660ebe96

View File

@ -116,7 +116,7 @@ class Roles:
"""dump the nested role hierarchy""" """dump the nested role hierarchy"""
return yaml.dump(self.roles, Dumper=CustomDumper) return yaml.dump(self.roles, Dumper=CustomDumper)
def _check_member(role, groups, notroles, roles, parentroles, usedgroups): def _check_member(self, role, groups, notroles, roles, parentroles, usedgroups):
if role in notroles: if role in notroles:
return False return False
@ -156,7 +156,7 @@ class Roles:
usedgroups = {} usedgroups = {}
unusedgroups = {} unusedgroups = {}
ret = {} ret = {}
for r in self.roles: for role in self.roles:
self._check_member(role, groups, notroles, roles, parentroles, usedgroups) self._check_member(role, groups, notroles, roles, parentroles, usedgroups)
for b in groups: for b in groups:
for g in groups[b]: for g in groups[b]: