{% extends 'manage/users/master.twig' %} {% from 'macros.twig' import container_title %} {% from 'manage/macros.twig' import permissions_table %} {% from '_layout/input.twig' import input_csrf, input_text, input_checkbox, input_file, input_select, input_colour, input_hidden %} {% set site_link = url('user-profile', {'user': user_info.id}) %} {% block manage_content %}
{% if manage_notices|length > 0 %}
{% for notice in manage_notices %}

{{ notice }}

{% endfor %}
{% endif %}
{{ container_title('Editing ' ~ user_info.username ~ ' (' ~ user_info.id ~ ')') }} {{ input_csrf() }}
{% if can_edit_user %} {% endif %}
{{ input_colour(can_edit_user ? 'colour[hex]' : '', '', user_info.userColour) }}
{# TODO: if the hierarchy of the current user is too low to touch the role then opacity should be lowered and input disabled #}
{% for role in manage_roles %} {% endfor %}
{% if can_edit_user %}
{% endif %}
{% if current_user.super %}
{{ container_title('Send test e-mail to ' ~ user_info.username ~ ' (' ~ user_info.id ~ ')') }}

DO NOT ABUSE THIS SHIT

{{ input_csrf() }} {{ input_hidden('send_test_email', 'yes_send_it') }}
{{ container_title('Impersonate ' ~ user_info.username ~ ' (' ~ user_info.id ~ ')') }}

Uses a special token to completely impersonate this user for testing.

{{ input_csrf() }} {{ input_hidden('impersonate_user', 'meow') }}
{% endif %}
{{ container_title('Permissions for ' ~ user_info.username ~ ' (' ~ user_info.id ~ ')') }} {{ permissions_table(permissions, not can_edit_perms) }} {% if can_edit_perms %} {{ input_csrf() }}
{% endif %}
{% endblock %}