Sort roles list when viewing a user

This commit is contained in:
Lance Edgar 2022-05-03 14:13:47 -05:00
parent c371db3534
commit 18c3c57930

View file

@ -386,7 +386,7 @@ class UserView(PrincipalMasterView):
return six.text_type(name)
def render_roles(self, user, field):
roles = user.roles
roles = sorted(user.roles, key=lambda r: r.name)
items = []
for role in roles:
text = role.name