diff options
| author | bwarsaw | 2001-10-21 06:37:15 +0000 |
|---|---|---|
| committer | bwarsaw | 2001-10-21 06:37:15 +0000 |
| commit | 6daddbc9af5accfb615b0f362b59ccd46d4f17dc (patch) | |
| tree | 30ce6c314a6ae63415bc8eae7ef495cb07ef981a | |
| parent | ce5b622376344aaa33a0bff5ad185aa847a57bf5 (diff) | |
| download | mailman-6daddbc9af5accfb615b0f362b59ccd46d4f17dc.tar.gz mailman-6daddbc9af5accfb615b0f362b59ccd46d4f17dc.tar.zst mailman-6daddbc9af5accfb615b0f362b59ccd46d4f17dc.zip | |
main(): Call DeleteMember() when the unsubscribe button was hit so
that we can apply any list admin approval if necessary.
Also, the result message displayed depends on whether approval was
needed or not.
| -rw-r--r-- | Mailman/Cgi/options.py | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/Mailman/Cgi/options.py b/Mailman/Cgi/options.py index eef98a9c2..7b0a1998d 100644 --- a/Mailman/Cgi/options.py +++ b/Mailman/Cgi/options.py @@ -341,9 +341,13 @@ def main(): # list admin?) is informed of the removal. signal.signal(signal.SIGTERM, sigterm_handler) mlist.Lock() + needapproval = 0 try: - mlist.ApprovedDeleteMember( - user, _('via the member options page'), userack=1) + try: + mlist.DeleteMember( + user, _('via the member options page'), userack=1) + except Errors.MMNeedApproval: + needapproval = 1 mlist.Save() finally: mlist.Unlock() @@ -356,11 +360,17 @@ def main(): title = _('Unsubscription results') doc.SetTitle(title) doc.AddItem(Header(2, title)) - doc.AddItem(_("""You have been successfully unsubscribed from the - mailing list %(fqdn_listname)s. If you were receiving digest - deliveries you may get one more digest. If you have any questions - about your unsubscription, please contact the list owners at - %(owneraddr)s.""")) + if needapproval: + doc.AddItem(_("""Your unsubscription request has been received and + forwarded on to the list moderators for approval. You will + receive notification once the list moderators have made their + decision.""")) + else: + doc.AddItem(_("""You have been successfully unsubscribed from the + mailing list %(fqdn_listname)s. If you were receiving digest + deliveries you may get one more digest. If you have any questions + about your unsubscription, please contact the list owners at + %(owneraddr)s.""")) doc.AddItem(mlist.GetMailmanFooter()) print doc.Format() return |
