Move timemachine controls into presale, implement session transfer for multidomain time machine support

This commit is contained in:
Mira Weller
2024-04-30 21:49:58 +02:00
parent 5b1175ff05
commit 64358be4ae
12 changed files with 139 additions and 65 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ class TimeMachineMiddleware:
def __call__(self, request):
if hasattr(request, 'event') and hasattr(request, '_namespace') and request._namespace == 'presale' and \
'timemachine_now_dt' in request.session and \
request.event.testmode and \
request.event.testmode and request.user.is_authenticated and \
request.user.has_event_permission(request.organizer, request.event, 'can_change_event_settings', request):
request.now_dt = parse(request.session['timemachine_now_dt'])
request.now_dt_is_fake = True