Permalink
Browse files

Fixed regression in admin login interface selector middleware. Closes #…

  • Loading branch information...
stephenmcd committed Apr 11, 2012
1 parent 5c5b5cb commit 9b16fea65546ac7684ab1f1bcb6a5a7910ff721b
Showing with 4 additions and 4 deletions.
  1. +4 −4 mezzanine/core/middleware.py
@@ -19,10 +19,10 @@ def process_view(self, request, view_func, view_args, view_kwargs):
if login_type and not request.user.is_authenticated():
response = view_func(request, *view_args, **view_kwargs)
if request.user.is_authenticated():
- next = request.GET.get("next", request.get_full_path())
- admin_url = reverse("admin:index")
- if login_type == "admin" and not next.startswith(admin_url):
- next = admin_url
+ if login_type == "admin":
+ next = request.get_full_path()
+ else:
+ next = request.GET.get("next", "/")
return HttpResponseRedirect(next)
else:
return response

0 comments on commit 9b16fea

Please sign in to comment.