core: mark session as modified instead of saving it directly to bump expiry

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-06-22 08:48:14 +02:00
parent ff6c508de7
commit f28509608b

View file

@ -361,7 +361,7 @@ class UserViewSet(UsedByMixin, ModelViewSet):
instance=request._request.session[SESSION_KEY_IMPERSONATE_ORIGINAL_USER], instance=request._request.session[SESSION_KEY_IMPERSONATE_ORIGINAL_USER],
context=context, context=context,
).data ).data
self.request.session.save() self.request.session.modified = True
return Response(serializer.initial_data) return Response(serializer.initial_data)
@permission_required("authentik_core.reset_user_password") @permission_required("authentik_core.reset_user_password")