diff --git a/tailbone/views/roles.py b/tailbone/views/roles.py index 858775e4..8b6529d4 100644 --- a/tailbone/views/roles.py +++ b/tailbone/views/roles.py @@ -71,10 +71,10 @@ def PermissionsFieldRenderer(permissions, *args, **kwargs): html += tags.hidden(self.name, value='') # ugly hack..or good idea? else: html = '' - for groupkey in sorted(permissions, key=lambda k: permissions[k]['label']): + for groupkey in sorted(permissions, key=lambda k: permissions[k]['label'].lower()): inner = HTML.tag('p', c=permissions[groupkey]['label']) perms = permissions[groupkey]['perms'] - for key in sorted(perms, key=lambda p: perms[p]['label']): + for key in sorted(perms, key=lambda p: perms[p]['label'].lower()): checked = has_permission(Session(), role, key, include_guest=False) label = perms[key]['label'] if readonly: