Commit 91410c0e authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

Default redirects

instead of raising a missing `next` parameter error.
parent 6a389a7b
......@@ -65,7 +65,8 @@ def login(request):
"""
next = request.GET.get('next')
if not next:
return HttpResponseBadRequest(_(astakos_messages.MISSING_NEXT_PARAMETER))
next = reverse('astakos.im.views.home')
if not restrict_next(
next, domain=COOKIE_DOMAIN, allowed_schemes=('pithos',)
):
......
......@@ -1258,8 +1258,7 @@ def project_search(request):
def project_join(request, application_id):
next = request.GET.get('next')
if not next:
return HttpResponseBadRequest(
_(astakos_messages.MISSING_NEXT_PARAMETER))
next = reverse('astakos.im.views.project_list')
rollback = False
try:
......@@ -1286,8 +1285,7 @@ def project_join(request, application_id):
def project_leave(request, application_id):
next = request.GET.get('next')
if not next:
return HttpResponseBadRequest(
_(astakos_messages.MISSING_NEXT_PARAMETER))
next = reverse('astakos.im.views.project_list')
rollback = False
try:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment