Skip to content

Commit

Permalink
Merge pull request #5203 from neos/bugfix/role-sorting
Browse files Browse the repository at this point in the history
BUGFIX: Sort roles for users by label instead of internal name in the UI
  • Loading branch information
Sebobo authored Aug 15, 2024
2 parents 2fe0915 + f796a5f commit d4d52ce
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ protected function getAllowedRoles(): array
$roles = $this->userService->currentUserIsAdministrator() ? $this->policyService->getRoles() : $currentUserRoles;

usort($roles, static function (Role $a, Role $b) {
return strcmp($a->getName(), $b->getName());
return strcmp($a->getLabel(), $b->getLabel());
});

return $roles;
Expand Down

0 comments on commit d4d52ce

Please sign in to comment.