forked from CGM_Public/pretix_original
Fix logout on reauth page
This commit is contained in:
@@ -75,7 +75,7 @@ class PermissionMiddleware(MiddlewareMixin):
|
|||||||
logout(request)
|
logout(request)
|
||||||
return self._login_redirect(request)
|
return self._login_redirect(request)
|
||||||
except SessionReauthRequired:
|
except SessionReauthRequired:
|
||||||
if url_name != 'user.reauth':
|
if url_name not in ('user.reauth', 'auth.logout'):
|
||||||
return redirect(reverse('control:user.reauth') + '?next=' + quote(request.get_full_path()))
|
return redirect(reverse('control:user.reauth') + '?next=' + quote(request.get_full_path()))
|
||||||
|
|
||||||
if 'event' in url.kwargs and 'organizer' in url.kwargs:
|
if 'event' in url.kwargs and 'organizer' in url.kwargs:
|
||||||
|
|||||||
@@ -21,8 +21,8 @@
|
|||||||
<button type="submit" class="btn btn-primary btn-block">
|
<button type="submit" class="btn btn-primary btn-block">
|
||||||
{% trans "Continue" %}
|
{% trans "Continue" %}
|
||||||
</button>
|
</button>
|
||||||
<a href={% url "control:auth.logout" %}"" class="btn btn-link btn-block">
|
<a href="{% url "control:auth.logout" %}" class="btn btn-link btn-block">
|
||||||
{% trans "Log in as someone else" %}
|
{% trans "Log in as someone else" %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user