Skip to content

Sorting Roles

The sort selector sits in the fixed action bar of the Roles Explorer, next to Expand All / Collapse All.

Sort dropdown

Sort Options

Option Order
Descending cardinality (default) Roles with the most permissions first
Ascending cardinality Roles with the fewest permissions first
Name (A–Z) Alphabetical
Name (Z–A) Reverse alphabetical

What "Cardinality" Means

Cardinality is the total number of permissions a role grants, including everything it inherits from its nested child roles — not just the permissions listed directly on that role. A role with few permissions of its own but several broad child roles nested under it can outrank a role with many direct permissions and no children.

Recursive Ordering

The chosen order applies at every level of the tree, not just the top: the list of top-level roles is sorted by the selected criterion, and then, independently, each role's own list of child roles is sorted by that same criterion — and so on, down through however many levels of nesting exist. A role's individual permissions list (shown when you expand it) is also reordered to match: alphabetically for either Name option, and by name in the corresponding direction for either Cardinality option (cardinality itself doesn't apply to a single permission, only to roles).

Switching sort order reloads the tree

Sorting is computed on the server, not in the browser — picking a different option re-fetches the whole hierarchy. If you have unsaved changes in the tree, save them first; changing the sort order discards anything pending, the same way navigating away would. See the unsaved-changes model.