{% extends "admin_app.html" %} {% from "library.j2" import box, form_button, standard_button, icon %} {% macro access_level_description(role, caller=None) %} {%- if role == "prosody:restricted" -%} {% trans %}Limited users can interact with users on the same Snikket service and be members of circles.{% endtrans %} {%- elif role == "prosody:registered" -%} {% trans %}Like limited users and can also interact with users on other Snikket services.{% endtrans %} {%- elif role == "prosody:admin" -%} {% trans %}Like normal users and can access the admin panel in the web portal.{% endtrans %} {%- endif -%} {% endmacro %} {% macro access_level_icon(role, caller=None) %} {%- if role == "prosody:restricted" -%} {% call icon("lock") %}{% endcall %} {%- elif role == "prosody:admin" -%} {% call icon("admin") %}{% endcall %} {%- endif -%} {% endmacro %} {% block content %}

{% trans user_name=target_user.localpart %}Edit user {{ user_name }}{% endtrans %}

{{ form.csrf_token }}
{% if target_user.deletion_request %}
{% trans %}This user account is pending deletion{% endtrans %}

{% trans date=target_user.deletion_request.deleted_at | format_datetime %}The owner of the account sent a deletion request on {{ date }} using their app.{% endtrans %}

{% trans time=(target_user.deletion_request.pending_until - now())|format_timedelta %}The account has been locked, and will be automatically deleted permanently in {{ time }}.{% endtrans %}

{% trans %}If this was a mistake, you can cancel the deletion and restore the account.{% endtrans %}

{%- call form_button("restore_from_trash", form.action_restore, class="secondary") %}{% endcall %}
{% elif not target_user.enabled %}
{% trans %}This user account is locked{% endtrans %}

{% trans %}The user will not be able to log in to their account until it is unlocked again.{% endtrans %}

{%- call form_button("lock_open", form.action_enable, class="secondary") %}{% endcall %}
{% endif %}

{% trans %}Edit user{% endtrans %}

{{ form.localpart.label }} {{ form.localpart(readonly="readonly") }}

{% trans %}The login name cannot be changed.{% endtrans %}

{{ form.display_name.label }} {{ form.display_name }}

{% trans %}Access Level{% endtrans %}

{% trans %}The access level of a user determines what interactions are allowed for them on your Snikket service.{% endtrans %}

{#- -#} {{ form.role.label.text }} {%- for level in form.role -%}
{{ level }}
{%- endfor -%}
{%- call standard_button("back", url_for(".users"), class="tertiary") -%} {%- trans -%}Return to user list{%- endtrans -%} {%- endcall -%} {%- call standard_button("delete", url_for(".delete_user", localpart=target_user.localpart), class="secondary") -%} {%- trans -%}Delete user{%- endtrans -%} {%- endcall -%} {%- call form_button("done", form.action_save, class="primary") %}{% endcall -%}

{% trans %}Further actions{% endtrans %}

{% trans %}Reset password{% endtrans %}

{{ form.csrf_token }}

{% trans %}If the user has lost their password, you can use the button below to create a special link which allows to change the password of the account, once.{% endtrans %}

{%- call form_button("passwd", form.action_create_reset, class="primary") -%}{%- endcall -%}

{% trans %}Debug information{% endtrans %}

{% trans %}In some cases, extended information about the user account and the connected devices is necessary to troubleshoot issues. The button below reveals this (sensitive) information.{% endtrans %}

{%- call standard_button("bug_report", url_for(".debug_user", localpart=target_user.localpart), class="primary") -%} {%- trans -%}Show debug information{%- endtrans -%} {%- endcall -%}
{% endblock %}