OAuth authorize dialog: Show which user you are logged in as

This commit is contained in:
Raphael Michel
2021-04-11 15:10:10 +02:00
parent 3044b9346a
commit 0a6b53b63b
3 changed files with 68 additions and 36 deletions

View File

@@ -1,5 +1,6 @@
{% load compress %}
{% load i18n %}
{% load hijack_tags %}
{% load static %}
<!DOCTYPE html>
<html{% if rtl %} dir="rtl" class="rtl"{% endif %}>
@@ -38,6 +39,20 @@
</div>
{% endfor %}
{% endif %}
{% if request|is_hijacked %}
<div class="impersonate-warning">
<span class="fa fa-user-secret"></span>
{% blocktrans with user=request.user%}You are currently working on behalf of {{ user }}.{% endblocktrans %}
<form action="{% url 'control:users.impersonate.stop' %}" method="post" class="helper-display-inline">
{% csrf_token %}
<button class="btn btn-default btn-sm">
{% trans "Stop impersonating" %}
</button>
</form>
</div>
{% endif %}
{% block content %}
{% endblock %}
<footer>