Sort roles list when viewing a user
This commit is contained in:
parent
c371db3534
commit
18c3c57930
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue