1
0
Fork 0
mirror of https://github.com/kakwa/ldapcherry synced 2025-07-04 12:27:47 +02:00

force the groups in flatten roles to be sorted

* sorting the groups helps debuggability and also permits testing
that doesn't rely on python ordering (which is different between 2 and
3).
This commit is contained in:
kakwa 2019-02-09 17:36:01 +01:00
parent baa3430e63
commit 05aace0e9d
2 changed files with 45 additions and 1 deletions

View file

@ -58,6 +58,7 @@ class Roles:
ret[b].add(group)
for b in ret:
ret[b] = list(ret[b])
ret[b].sort()
return ret
def _flatten(self, roles=None, groups=None):