From 0a6b53b63b872b66f8db84793b840e0a87ce26bf Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Sun, 11 Apr 2021 15:10:10 +0200 Subject: [PATCH] OAuth authorize dialog: Show which user you are logged in as --- .../templates/pretixcontrol/auth/base.html | 15 ++++ .../auth/oauth_authorization.html | 77 ++++++++++--------- .../static/pretixcontrol/scss/auth.scss | 12 +++ 3 files changed, 68 insertions(+), 36 deletions(-) diff --git a/src/pretix/control/templates/pretixcontrol/auth/base.html b/src/pretix/control/templates/pretixcontrol/auth/base.html index f9763cb6f6..b91ace8449 100644 --- a/src/pretix/control/templates/pretixcontrol/auth/base.html +++ b/src/pretix/control/templates/pretixcontrol/auth/base.html @@ -1,5 +1,6 @@ {% load compress %} {% load i18n %} +{% load hijack_tags %} {% load static %} @@ -38,6 +39,20 @@ {% endfor %} {% endif %} + {% if request|is_hijacked %} +
+ + {% blocktrans with user=request.user%}You are currently working on behalf of {{ user }}.{% endblocktrans %} + +
+ {% csrf_token %} + +
+
+ {% endif %} + {% block content %} {% endblock %}