{% extends "base.html" %} {% load i18n %} {% load django_bootstrap5 %} {% load bootstrap_icons %} {% block title %}{% trans "Profile" %}{% endblock %} {% block page_heading %}{% trans "Profile" %}{% endblock page_heading %} {% block content %}

{{ user.get_full_name|default:user.username }}

{% if user.is_superuser %} {% trans "Superuser" %} {% elif user.is_staff %} {% trans "Template editor" %} {% endif %}
{{ user.username }}
{% if user.email %}
{{ user.email }}
{% endif %}
{% trans "Last login" %} {{ user.last_login|date:"Y-m-d H:i"|default:_("never") }}
{% csrf_token %} {% bootstrap_form profile_form %}
{# an LDAP user's password is changed in LDAP #} {% if perms.accounts.change_password and user.has_usable_password %} {% endif %}

{% trans "SSH Keys" %} {{ publickeys|length }}

{% trans "Offered when you create a VM and on a VM's Access tab." %}
{% include "ssh_key_list.html" %}
{% csrf_token %} {% bootstrap_form ssh_key_form %}

{% trans "API Tokens" %} {{ api_tokens|length }}

{% blocktrans %}A token lets a script or a tool use the REST API as you, without your password or OTP: send it as Authorization: Token <token>. A password change does not delete tokens: delete a token you no longer use, or one that may have leaked.{% endblocktrans %}
{% include "api_token_list.html" %}
{% csrf_token %} {% bootstrap_form api_token_form %}
{% endblock %}