{% extends "base.html" %} {% load i18n %} {% load translations %} {% load crispy_forms_tags %} {% load permissions %} {% load icons %} {% block breadcrumbs %}
  • {{ object }}
  • {% trans "Access control" %}
  • {% endblock %} {% block content %} {% perm 'user.edit' as can_edit_user %}

    {% documentation_icon 'admin/access' 'groups' right=True %} {% trans "Users" %}

    {% if can_edit_user %} {% endif %} {% for user in all_users %} {% if can_edit_user %} {% endif %} {% endfor %} {% for userblock in blocked_users %} {% endfor %}
    {% trans "Username" %} {% trans "Full name" %}{% trans "E-mail" %}{% trans "Last sign in" %} {% trans "Teams" %}
    {{ user.username }} {{ user.full_name }} {{ user.email }} {% if user.last_login %} {{ user.last_login|naturaltime }} {% else %} {% trans "Not yet signed in" %} {% endif %} {% for group in user.project_groups %} {{ group }} {% endfor %} {% icon 'pencil.svg' %} {% icon 'delete.svg' %}
    {% csrf_token %}
    {% csrf_token %}
    {% if not user.last_login %}
    {% csrf_token %}
    {% endif %}
    {{ userblock.user.username }} {{ userblock.user.full_name }} {{ userblock.user.email }} {% if userblock.user.last_login %}{{ userblock.user.last_login|naturaltime }}{% else %}{% trans "Not yet signed in" %}{% endif %} {% if userblock.expiry %} {% blocktrans with expiry=userblock.expiry|date:"DATE_FORMAT" %}Blocked until {{ expiry }}{% endblocktrans %} {% else %} {% trans "Blocked permanently" %} {% endif %}
    {% csrf_token %}

    {% trans "Once all its permissions are removed, the user will be removed from the project." %}

    {% csrf_token %}

    {% documentation_icon 'admin/access' 'invite-user' right=True %} {% trans "Add a user" %}

    {{ add_user_form|crispy }}
    {% csrf_token %}

    {% documentation_icon 'admin/access' 'block-user' right=True %} {% trans "Block user" %}

    {{ block_user_form|crispy }}
    {% csrf_token %}

    {% documentation_icon 'admin/access' 'invite-user' right=True %} {% trans "Invite new user" %}

    {{ invite_user_form|crispy }}

    {% documentation_icon 'admin/access' 'groups' right=True %} {% trans "Teams" %}

    {% for group in groups %} {% endfor %}
    {% trans "Name" %} {% trans "Roles" %} {% trans "Languages" %}
    {{ group.name }} {% for role in group.roles.all %} {{ role }} {% empty %} {% trans "Access only" %} {% endfor %} {% if group.language_selection %} {% trans "All languages" %} {% else %} {% for language in group.languages.all %} {{ language }} {% endfor %} {% endif %} {% icon 'pencil.svg' %} {% icon 'delete.svg' %}
    {% csrf_token %}
    {% csrf_token %}

    {% documentation_icon 'admin/access' 'groups' right=True %} {% trans "Create new team" %}

    {% crispy create_team_form %}

    {% documentation_icon 'api' right=True %} {% trans "API access" %}

    {% for token in project_tokens %} {% endfor %}
    {% trans "Name" %} {% trans "Expires" %}
    {{ token.name }} {{ token.expires }} {% icon 'delete.svg' %}
    {% csrf_token %}
    {% csrf_token %}

    {% documentation_icon 'api' right=True %} {% trans "Create a project token" %}

    {{ create_project_token_form|crispy }}

    {% documentation_icon 'api' right=True %} {% trans "Personal API key" %}

    {% trans "Your personal API key:" %} {{ user.auth_token.key }}
    {% if ssh_key %}

    {% documentation_icon 'vcs' right=True %} {% trans "SSH key" %}

    {% include "snippets/ssh-key.html" %}
    {% endif %} {% documentation_icon 'vcs' right=True %}
    {% endblock %}