{% extends "base.html" %} {% from "components/ui.html" import card, csrf_field, empty, filter_bar, icon, link_button, pager, tick, tick_all with context %} {% from "components/grants.html" import rights_of, role_tags %} {% block title %}Users · {{ APP_NAME }}{% endblock %} {% block heading %}Users{% endblock %} {% block subheading %}
Who may use the service, and with which rights
{% endblock %} {% block actions %} {% if can_create %}{{ link_button("/ui/users/new", "New user", "plus-lg", cls="primary") }}{% endif %} {% endblock %} {% block content %} {% call card("Users", meta=none if pages[0] or pages[1] else users | length, tight=True) %}
{{ filter_bar(bar) }}
{% if users %} {% if can_batch %}
{{ csrf_field() }} {% if role_choices %} {% endif %}
{% endif %}
{% if can_batch %}{% endif %} {% for user in users %} {% if can_batch %}{% endif %} {% endfor %}
{{ tick_all("users-batch", "user") }}NameRolesRights
{{ tick("users-batch", "user", user.id, "Tick " ~ user.name) }} {{ user.name }} {% if user.id == me.user_id %}you{% endif %} {% if not user.ui_sign_in %}API only{% endif %} {% if user.disabled %}disabled{% endif %} {{ user.id[:16] }}… {{ role_tags(user.roles) }} {{ rights_of(user.service, user.grants, names) }}
{% else %} {{ empty("No user matches." if bar.chips else "No user yet.") }} {% endif %} {{ pager(pages, back="First", on="Next") }} {% endcall %} {% endblock %}