diff options
| author | bwarsaw | 2001-10-21 22:11:20 +0000 |
|---|---|---|
| committer | bwarsaw | 2001-10-21 22:11:20 +0000 |
| commit | 73f2695a7a9c39955ef30439ffe159e23a26fd03 (patch) | |
| tree | d42be49b51a51482dbad237ec98f78354b1caf50 | |
| parent | d4f2613f8599d5a64f64370a39d05179f7e8ba90 (diff) | |
| download | mailman-73f2695a7a9c39955ef30439ffe159e23a26fd03.tar.gz mailman-73f2695a7a9c39955ef30439ffe159e23a26fd03.tar.zst mailman-73f2695a7a9c39955ef30439ffe159e23a26fd03.zip | |
| -rw-r--r-- | Mailman/MailCommandHandler.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Mailman/MailCommandHandler.py b/Mailman/MailCommandHandler.py index 1e41027c3..f8bfaa72c 100644 --- a/Mailman/MailCommandHandler.py +++ b/Mailman/MailCommandHandler.py @@ -557,7 +557,17 @@ the `-request' address for that list."""), trunc = 0) return try: - if password is None: + if self.unsubscribe_policy: + # If we're doing admin-approved unsubs, then don't worry about + # the password. + try: + self.DeleteMember(addr, 'mailcmd') + except Errors.MMNeedApproval: + self.AddToResponse( + _("""\ +Your unsubscription request has been forwarded to the list administrator for +approval."""), trunc=0) + elif password is None: # If no password was given, we need to do a mailback # confirmation instead of unsubscribing them here. cpaddr = self.getMemberCPAddress(addr) @@ -565,11 +575,13 @@ the `-request' address for that list."""), self.AddToResponse( _('A removal confirmation message has been sent.')) else: + # No admin approval is necessary, so we can just delete them + # if the passwords match.a oldpw = self.getMemberPassword(addr) if oldpw <> password: self.AddError(_('You gave the wrong password.')) else: - self.DeleteMember(addr, 'mailcmd') + self.ApprovedDeleteMember(addr, 'mailcmd') self.AddToResponse(_("Succeeded.")) # FIXME: we really need to make these exceptions sane! except (Errors.MMNoSuchUserError, Errors.MMNotAMemberError, |
