mirror of
https://git.linux-kernel.at/oliver/ivatar.git
synced 2025-11-20 15:08:02 +00:00
Login page didn't respect the next parameter, bad UX. Fixed.
This commit is contained in:
@@ -1109,6 +1109,10 @@ class IvatarLoginView(LoginView):
|
||||
"""
|
||||
if request.user:
|
||||
if request.user.is_authenticated:
|
||||
# Respect the 'next' parameter if present
|
||||
next_url = request.GET.get("next")
|
||||
if next_url:
|
||||
return HttpResponseRedirect(next_url)
|
||||
return HttpResponseRedirect(reverse_lazy("profile"))
|
||||
return super().get(self, request, args, kwargs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user