{# The people who are members of this workspace, and the three things an administrator does to a membership: change its role, disable or enable it, and end its sessions everywhere. Every control calls the JSON API through the page's script — `PATCH /api/v1/auth/users/{id}` and `POST /api/v1/auth/users/{id}/sign-out` — exactly as the key buttons on the auth page do. None of the rules is here: the last administrator staying one, nobody disabling themselves, and a disable taking the person's sessions and keys with it are the service's, and a refusal arrives in the status line in the words the API used. Members are identified by id in every request, because an address can be shared by two accounts at two providers. The row you are signed in as is marked, and nothing more: whether you may change it is the service's question, not the template's. #}{% extends layout %} {% import "macros.html" as m %} {% block content %}

Members

Add a person

Give them a password (at least 12 characters) and they sign in with their handle and make their own API keys; leave it empty and this mints their first key instead, shown once, for you to hand over. {% if panels.providers.ok and panels.providers.data.key_login_path %} Either way they sign in to this browser surface, and a program sends a key in a header. {% else %} This installation does not offer a browser sign-in (that needs security.auth.mode = "api_key" and a security.auth.session_secret), so a key sent in a header is the only way in. {% endif %}

{% if panels.users.ok %} {% if panels.users.data.users %}

{{ panels.users.data.count }} member(s), {{ panels.users.data.admins }} enabled administrator(s).

{% for user in panels.users.data.users %} {% endfor %}
PersonProviderRolePasswordStandingSessionsLast sign-in
{{ user.name or user.email or user.id }}{% if user.id == me %} you{% endif %} {% if user.email and user.name %}
{{ user.email }}{% endif %}
{{ user.id }}
{{ user.provider }} {% if user.provider == 'local' %}{{ 'set' if user.has_password else 'none' }}{% else %}their provider's{% endif %} {{ 'disabled' if user.disabled else 'enabled' }} {{ user.sessions if user.sessions is not none else '—' }} {{ user.last_login_at or 'never' }} {% if user.disabled %} {% else %} {% if user.provider == 'local' %} {% endif %} {% endif %}

Setting a password ends every session that person holds, and is also how a forgotten one is recovered: nothing is emailed, so you choose a new one and hand it over, and they can change it from the API keys page. Disabling a member ends every session they hold here, revokes every API key they minted and clears their password, at once; enabling them again restores the membership and not those credentials. A workspace that has an enabled administrator always keeps one.

{% else %}{{ m.empty('Nobody is a member of this workspace yet.') }}{% endif %} {% else %}{{ m.failed(panels.users) }}{% endif %}
{% endblock %}