{# Stale-role banner — shown on the unified /admin/permissions landing when the local capability matrix still holds rows for role slugs that are no longer active in Auth (deleted / deactivated / renamed upstream). Expected context: stale_role_slugs : list[str] — orphan slugs cleanup_url : str — POST target (e.g. /admin/permissions/cleanup-roles) csrf_token : str — request.cookies.get('csrftoken', '') from caller #} {% if stale_role_slugs %}
Orphan role rows detected
The capability matrix still has rows for
{{ stale_role_slugs | length }} role{{ 's' if stale_role_slugs | length != 1 else '' }}
no longer active in Auth:
{% for slug in stale_role_slugs %}{{ slug }}{% if not loop.last %}, {% endif %}{% endfor %}.
Clean up to keep permission data consistent.