diff options
| author | hmeland | 1999-06-04 14:26:38 +0000 |
|---|---|---|
| committer | hmeland | 1999-06-04 14:26:38 +0000 |
| commit | ab174f1e9be31f39b5777b5f6ec127dc44d22310 (patch) | |
| tree | a9e3dba146ea046fc6e60c7284cbdd93bb600555 /Mailman/MailCommandHandler.py | |
| parent | 562feff6072b0429b3692c7bb8b884c1ea0b11ec (diff) | |
| download | mailman-ab174f1e9be31f39b5777b5f6ec127dc44d22310.tar.gz mailman-ab174f1e9be31f39b5777b5f6ec127dc44d22310.tar.zst mailman-ab174f1e9be31f39b5777b5f6ec127dc44d22310.zip | |
Changes to speed up mass subscription via the web:
MailList.py:
Changed MailList.SetUserOption() to take a `save_list' keyword
argument (defaulting to true). When false, SetUserOption won't do
self.Save() after changing the option.
New function MailList.ApprovedAddMembers() (note plural) that takes
a list of prospective new list members (and possibly a list of
corresponding passwords), and does _all_ the necessary list changes
before saving the list configuration. Empty passwords are
substituted with randomly generated ones. Returns a dict with
{address: exception_tuple} entries -- exception_tuple is either None
or a two-element tuple containing the first exception type and value
raised when trying to add address. The exception traceback object
isn't included in the returned dict, because a) I don't think it is
very useful for the relevant exceptions, and b) using it wrongly
could cause some fuzz with Python's garbage collector -- i.e. we
would leak memory.
Changed MailList.ApprovedAddMember() to be a mere wrapper, calling
the new ApprovedAddMembers() function and reraising any exception in
the returned dict.
Also made the logic of the code doing subject prefixing a bit
clearer, and changed MailList.aside_new() so that list's config.db
files are saved with umask 007 (as they contain all list members'
passwords in clear text).
Utils.py:
New function MakeRandomPassword(length=4), used by
MailList.ApprovedAddMembers() whenever empty passwords are found.
The default random password length should possibly be made site
configurable.
Also, fixed an error in the _badchars regular expression -- the
final "," was probably meant to be inside the character set.
Cgi/admin.py:
Changed ChangeOptions() to use the new MailList.ApprovedAddMembers()
function.
Diffstat (limited to 'Mailman/MailCommandHandler.py')
0 files changed, 0 insertions, 0 deletions
