{% extends "base.html" %} {% from "components/ui.html" import breadcrumb, card, csrf_field, danger_card, fact, facts, icon with context %} {% from "components/grants.html" import grant_editor, grants_of, service_editor, service_of %} {% block title %}{{ role.id }} · {{ APP_NAME }}{% endblock %} {% block heading %}Role {{ role.id }}{% endblock %} {% block subheading %}{{ breadcrumb([("Roles", "/ui/roles"), (role.id, None)]) }}{% endblock %} {% block content %} {% call facts("Role") %} {% call fact("Service rights") %}{{ service_of(role.service) }}{% endcall %} {% call fact("Grants") %}{{ grants_of(role.grants, names) }}{% endcall %} {% if holders is not none %} {% call fact("Users") %}{% for user in holders %}{{ user.name }} {% else %}—{% endfor %}{% endcall %} {% endif %} {% endcall %} {% if can_update %}
{% endif %} {% if can_delete %} {{ danger_card("Delete", "Only a role no user holds can be deleted.", "/ui/roles/" ~ (role.id | segment) ~ "/delete", "Delete role", "Delete the role " ~ role.id ~ "?") }} {% endif %} {% endblock %}