Pavan Koli has proposed merging lp:~pskoli93/postorius/Redirection-Fixes into 
lp:postorius.

Requested reviews:
  Mailman Coders (mailman-coders)

For more details, see:
https://code.launchpad.net/~pskoli93/postorius/Redirection-Fixes/+merge/257457

There are some redirection issues during unsubscription, suppose we want to 
unsubscribe a member if we click on unsubscribe button present on the 
list_members page then we are redirected to list_summary page instead we should 
be redirected to  the list_members page.

So we have to check the email if it is equal to request.user.email, then we 
should redirect to list_summary page else redirect to list_members page.
-- 
Your team Mailman Coders is requested to review the proposed merge of 
lp:~pskoli93/postorius/Redirection-Fixes into lp:postorius.
=== modified file 'src/postorius/views/list.py'
--- src/postorius/views/list.py	2015-04-17 21:51:29 +0000
+++ src/postorius/views/list.py	2015-04-25 09:41:16 +0000
@@ -306,8 +306,10 @@
             return utils.render_api_error(request)
         except ValueError, e:
             messages.error(request, e)
-        return redirect('list_summary', self.mailing_list.list_id)
-
+        if(email == request.user.email):
+            return redirect('list_summary', self.mailing_list.list_id)
+        else:
+            return redirect('list_members', self.mailing_list.list_id)
 
 class ListMassSubscribeView(MailingListView):
     """Mass subscription."""

_______________________________________________
Mailman-coders mailing list
[email protected]
https://mail.python.org/mailman/listinfo/mailman-coders

Reply via email to