{# 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

{% if panels.providers.ok and panels.providers.data.mode != 'oauth' %}

People become members by signing in, and this installation's authentication mode is {{ panels.providers.data.mode }}, so nobody signs in here. Programs authenticate with API keys, on the API keys page.

{% 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 %}
PersonProviderRoleStandingSessionsLast 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 }} {{ '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 %} {% endif %}

Disabling a member ends every session they hold here and revokes every API key they minted, 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 has signed in to this workspace yet.') }}{% endif %} {% else %}{{ m.failed(panels.users) }}{% endif %}
{% endblock %}