You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extend GET /api/authz/v1/roles/ (RoleListView) to support the table controls the Roles and Permissions view needs. The catalog shape (roles + permissions + categories per scope_types, ADR 0028 / get_role_catalog) already exists; this is the list-controls layer on top of it.
search by role display name;
filter by type of resource (the design shows a single "Type of resource" filter; maps to scope_types). The design does not expose a standard-vs-custom filter — the distinction is the per-row "Custom Role" sub-label (definition_kind in the response), so the response must carry definition_kind but a server-side filter on it is optional;
sort by role name, type of resource, member count, last updated;
pagination (prev/next; response needs a total count for "Showing N of M").
Acceptance
New query params documented and validated (400 on bad input, consistent with existing scope-type validation).
user_count (members) and modified (last updated) are sortable server-side; the per-role granted-permission count is available for the "Permissions" column.
definition_kind (static / user_defined) is present on every role in the response.
Authorization unchanged from ADR 0028 (per-resource-type view-team permission).
Under discussion: the draft Custom Roles API ADR for #469 (ADR 0036, not merged yet) proposes changes that affect this ticket. Nothing is final until the ADR is approved.
Proposed details for the list controls:
Role fields: each role adds user_count (distinct users, counting only scopes the caller can view, like assignment_count in ADR 0024) and updated_at (null for static roles). The field is updated_at, not modified.
Query parameters:search (case-insensitive on display name), sort_by (display_name, scope_type, user_count, updated_at) and order (asc/desc). The names match ADR 0024, and unknown values return 400.
Search and sort run in Python: static role names are translated with gettext, so the database can't search or sort them in the user's language. The roles of the requested scope types are loaded, searched, sorted and then paginated. User counts come from one grouped query.
Activity
rodmgwgu commentedon Nov 5, 2026
Under discussion: the draft Custom Roles API ADR for #469 (ADR 0036, not merged yet) proposes changes that affect this ticket. Nothing is final until the ADR is approved.
Proposed details for the list controls:
user_count(distinct users, counting only scopes the caller can view, likeassignment_countin ADR 0024) andupdated_at(nullfor static roles). The field isupdated_at, notmodified.search(case-insensitive on display name),sort_by(display_name,scope_type,user_count,updated_at) andorder(asc/desc). The names match ADR 0024, and unknown values return 400.