Per-user monthly password reminders [Patch]
This is a patch against 2.0.3 to enable per-user monthly password reminders. This is a _very_ sought-after feature request from the Debian community. :) As I don't have CVS access, I'd appreciate if somebody could review and apply. Thanks. :) --- mailman-2.0.3.orig/Mailman/Defaults.py.in +++ mailman-2.0.3/Mailman/Defaults.py.in @@ -531,6 +531,7 @@ AcknowledgePosts = 4 DisableMime = 8 # Digesters only ConcealSubscription = 16 +PasswordReminder = 32 # Useful directories LIST_DATA_DIR = os.path.join(VAR_PREFIX, 'lists') --- mailman-2.0.3.orig/Mailman/Cgi/options.py +++ mailman-2.0.3/Mailman/Cgi/options.py @@ -113,6 +113,11 @@ 'setdigest', 'Submit My Changes') replacements['<mm-unsubscribe-button>'] = ( mlist.FormatButton('unsub', 'Unsubscribe')) + replacements['<mm-get-password-reminder-button>'] = mlist.FormatOptionButton( + mm_cfg.PasswordReminder, 1, user) + replacements['<mm-no-password-reminder-button>'] = mlist.FormatOptionButton( + mm_cfg.PasswordReminder, 0, user) + replacements['<mm-digest-pw-box>'] = mlist.FormatSecureBox('digpw') replacements['<mm-unsub-pw-box>'] = mlist.FormatSecureBox('upw') replacements['<mm-old-pw-box>'] = mlist.FormatSecureBox('opw') --- mailman-2.0.3.orig/Mailman/Cgi/handle_opts.py +++ mailman-2.0.3/Mailman/Cgi/handle_opts.py @@ -222,6 +222,7 @@ dont_receive = getval('dontreceive', useropt(user, mm_cfg.DontReceiveOwnPosts)) ack_posts = getval('ackposts', useropt(user, mm_cfg.AcknowledgePosts)) + remind_pass = getval('remindpass', useropt(user, mm_cfg.PasswordReminder)) disable_mail = getval('disablemail', useropt(user, mm_cfg.DisableDelivery)) conceal = getval('conceal', useropt(user, mm_cfg.ConcealSubscription)) @@ -260,6 +261,7 @@ mlist.SetUserOption(user, mm_cfg.DisableDelivery, disable_mail) mlist.SetUserOption(user, mm_cfg.DontReceiveOwnPosts, dont_receive) mlist.SetUserOption(user, mm_cfg.AcknowledgePosts, ack_posts) + mlist.SetUserOption(user, mm_cfg.PasswordReminder, remind_pass) mlist.SetUserOption(user, mm_cfg.DisableMime, mime) msg = 'You have successfully set your options.' try: --- mailman-2.0.3.orig/Mailman/HTMLFormatter.py +++ mailman-2.0.3/Mailman/HTMLFormatter.py @@ -120,7 +120,8 @@ mm_cfg.DisableMime : "mime", mm_cfg.AcknowledgePosts : "ackposts", mm_cfg.Digests : "digest", - mm_cfg.ConcealSubscription : "conceal" + mm_cfg.ConcealSubscription : "conceal", + mm_cfg.PasswordReminder : "remindpass", }[type] import sys return ('<input type=radio name="%s" value="%d"%s>' --- mailman-2.0.3.orig/templates/options.html +++ mailman-2.0.3/templates/options.html @@ -139,6 +139,11 @@ <MM-Hide-Subscription-Button> Yes <p> </td></tr> <tr><TD BGCOLOR="#dcdcdc"> +<strong> Get monthly password reminders? </strong><br> +<MM-Get-Password-Reminder-Button> Yes +<MM-No-Password-Reminder-Button> No <p> +</td></tr> +<tr><TD BGCOLOR="#dcdcdc"> Password: <MM-Digest-Pw-Box> <MM-Digest-Submit><p> </td></tr></table> </center> -- Tollef Fog Heen Unix _IS_ user friendly... It's just selective about who its friends are.
On Sat, Mar 24, 2001 at 02:58:14AM +0100, Tollef Fog Heen wrote:
This is a patch against 2.0.3 to enable per-user monthly password reminders. This is a _very_ sought-after feature request from the Debian community. :)
As I don't have CVS access, I'd appreciate if somebody could review and apply. Thanks. :)
Hm, I'm personaly against adding more user-specific options per-list, but I guess this one could be list-specific anyway, even after we get a real user-database. I guess it's up to Barry ;)
As for the patch, I suggest you upload it to Sourceforge, which is where Mailman is hosed. Submit enough sensible patches and you might get CVS write access, eventually ;)
-- Thomas Wouters <thomas@xs4all.net>
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
On Wed, Mar 28, 2001 at 03:18:38PM +0200, Thomas Wouters wrote:
I suggest you upload it to Sourceforge, which is where Mailman is hosed.
What a wicked, wicked typo! I meant to say 'hosted'. Really I did!
-- Thomas Wouters <thomas@xs4all.net>
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
- Thomas Wouters
| Hm, I'm personaly against adding more user-specific options per-list, but I | guess this one could be list-specific anyway, even after we get a real | user-database. I guess it's up to Barry ;)
Pretty please with sugar on top? :-)
| As for the patch, I suggest you upload it to Sourceforge, which is where | Mailman is hosed. ^^^^^ *cough*
done. :)
--
Tollef Fog Heen Unix _IS_ user friendly... It's just selective about who its friends are.
admin(11159): [----- Mailman Version: 2.0.1 -----] admin(11159): [----- Traceback ------] admin(11159): Traceback (most recent call last): admin(11159): File "/home/mailman/scripts/driver", line 96, in run_main admin(11159): main() admin(11159): File "/home/mailman/Mailman/Cgi/handle_opts.py", line 73, in main admin(11159): process_form(mlist, user, doc) admin(11159): File "/home/mailman/Mailman/Cgi/handle_opts.py", line 100, in process_form admin(11159): mlist.DeleteMember(user, "web cmd") admin(11159): File "/home/mailman/Mailman/MailList.py", line 1182, in DeleteMember admin(11159): self.ClearBounceInfo(name) admin(11159): File "/home/mailman/Mailman/Bouncer.py", line 86, in ClearBounceInfo admin(11159): if self.bounce_info.has_key(email): admin(11159): AttributeError: 'tuple' object has no attribute 'has_key'
I ran into this when I was trying to unsub a member (I unchecked his checkbox), and add a new address at the same time (yes, I was changing a member's email address ;-)
I've sub'ed it to sourceforge, but it was misbehaving at the time (php errors on and off...), so I'm not sure it "took"
FYI
participants (4)
-
barry@digicool.com
-
Scott Brown
-
Thomas Wouters
-
Tollef Fog Heen