Skip to content
Snippets Groups Projects
Unverified Commit 6247e797 authored by Peter Rotich's avatar Peter Rotich Committed by GitHub
Browse files

Merge pull request #4439 from JediKev/perms/alphabetize-role-staff-perms

perms: Alphabetize Role/Staff Permissions
parents c7cb2701 034c42b7
No related branches found
No related tags found
No related merge requests found
...@@ -320,6 +320,16 @@ class RolePermission { ...@@ -320,6 +320,16 @@ class RolePermission {
} }
static function allPermissions() { static function allPermissions() {
static $sorted = false;
if (!$sorted) {
// Sort permissions in alphabetical order
foreach (static::$_permissions as $k => $v) {
asort(static::$_permissions[$k]);
}
$sorted = true;
}
return static::$_permissions; return static::$_permissions;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment