{% extends "base.html" %} {% block title %}{{ subject }} — {{ t('access.title') }} — painfree{% endblock %} {% block body %}

{{ t('subject.heading') }} {{ subject }}

{{ t('subject.lede') }}

{% if granted == 'oversight' %}

{{ t('subject.granted_oversight') }}

{% elif granted %}

{{ t('subject.granted') }} {{ granted }}.

{% endif %} {% if revoked == 'oversight' %}

{{ t('subject.revoked_oversight') }}

{% elif revoked %}

{{ t('subject.revoked') }} {{ revoked }}. {{ t('subject.revoked_when') }}

{% endif %}

{{ t('access.oversight_heading') }}

{% if oversight %}

{{ t('subject.holds_oversight') }} {{ oversight.granted_by }}, {{ oversight.created_at | moment }}.

{# The scope names are the authorisation model's own vocabulary, generated from `painfree.identity`. They are matched on by code and are never translated. #}

{{ oversight_scopes | join(', ') }}

{% else %}

{{ t('subject.oversight_offer') }}

{{ oversight_scopes | join(', ') }}

{% endif %}

{{ t('subject.grants') }}

{% if grants %} {% for grant in grants %} {% endfor %}
{{ t('common.connection') }}{{ t('subject.level') }} {{ t('subject.carries') }}{{ t('subject.granted_by') }} {{ t('subject.since') }}
{{ grant.connection_id }} {{ grant.level.value }} {{ grant.scopes() | join(', ') }} {{ grant.granted_by }} {{ grant.created_at | moment }}
{% else %}

{{ t('subject.holds_nothing') }}{% if not oversight %} {{ t('subject.holds_nothing_tail') }}{% endif %}

{% endif %}

{{ t('subject.grant_a_connection') }}

{% if available or grants %}

{{ t('subject.regrant_note') }}

{% else %}

{{ t('access.no_connections') }}

{% endif %}

{{ t('subject.all_users') }}

{% endblock %}