Skip to content

Commit

Permalink
BUGFIX: Sort roles by label instead of internal name
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebobo committed Aug 15, 2024
1 parent 2fe0915 commit f796a5f
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 f796a5f

Please sign in to comment.