summaryrefslogtreecommitdiff
path: root/Mailman/Gui/GUIBase.py
Commit message (Collapse)AuthorAgeFilesLines
* Bite the bullet: rename the Mailman package to mailman.Barry Warsaw2008-02-271-209/+0
|
* Tweak copyright years.Barry Warsaw2008-02-071-1/+1
|
* Move the pending database into the SQLAlchemy/Elixir layer. The oldBarry Warsaw2007-08-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pending.py module is removed. Added an interface to this functionality such that any IPendable (essentially a key/value mapping) can be associated with a token, and that token can be confirmed and has a lifetime. Any keys and values can be stored, as long as both are unicodes. Added a doctest. Modified initialization of the database layer to support pluggability via setuptools. No longer is this layer initialized from a module, but now it's instantiated from a class that implements IDatabase. The StockDatabase class implements the SQLAchemy/Elixir layer, but this can be overridden in a setup.py. Bye bye MANAGERS_INIT_FUNCTION, we hardly knew ye. Added a package Mailman.app which will contain certain application specific functionality. Right now, the only there there is an IRegistar implementation, which didn't seem to fit anywhere else. Speaking of which, the IRegistrar interface implements all the logic related to registration and verification of email addresses. Think the equivalent of MailList.AddMember() except generalized out of a mailing list context. This latter will eventually go away. The IRegistrar sends the confirmation email. Added an IDomain interface, though the only implementation of this so far lives in the registration.txt doctest. This defines the context necessary for domain-level things, like address confirmation. A bunch of other cleanups in modules that are necessary due to the refactoring of Pending, but don't affect anything that's actually tested yet, so I won't vouch for them (except that they don't throw errors on import!). Clean up Defaults.py; also turn the functions seconds(), minutes(), hours() and days() into their datetime.timedelta equivalents. Consolidated the bogus email address exceptions. In some places where appropriate, use email 4.0 module names instead of the older brand. Switch from Mailman.Utils.unique_message_id() to email.utils.make_msgid() everywhere. This is because we need to allow sending not in the context of a mailing list (i.e. domain-wide address confirmation message). So we can't use a Message-ID generator that requires a mailing list. OTOH, this breaks Message-ID collision detection in the mail->news gateway. I'll fix that eventually. Remove the 'verified' row on the Address table. Now verification is checked by Address.verified_on not being None.
* Restoreing i18n in 2.2tkikuchi2007-03-011-1/+2
| | | | | | | | - As the default type of string in mailman-2.2 was set to 'unicode', i18n codes became need to be fixed. - Fixed: admin web interface. Other web interfaces needs more verification. - Fixed: non-digest delivery. Stil to go: digest and archive.
* Passwords done right.bwarsaw2007-01-141-17/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First off, there are several password hashing schemes added including SHA, salted-SHA, and RFC 2989 PBKDF2 (contributed by Bob Fleck). Then we encode the password using RFC 2307 style syntax. At least I think: specifically things like the PRF and iteration count for PBKDF2 are encoded the way I /think/ is intended for RFC 2307 but I could be wrong. Seems darn hard to find definitive information about that. In any event, even though CLEARTEXT passwords are supported, they are mostly deprecated, even for user passwords. It also allows us to easily update all passwords to a new hashing scheme when the existing schemes get cracked. The default scheme (specified in Defaults.py.in) is salted-SHA with a 20 byte salt (the salt length and PBKDF2 iteration counts can only be specified in the passwords.py file). These hashed passwords are used for user passwords, list owner and moderator passwords, and site and list creator passwords. Of course this means that user password reminders are impossible now. They've been ripped out of the code for a while, but now we'll need to implement password resets since user passwords cannot be recovered. bin/export has had several changes: - export no longer converts to dollar strings. Were assuming dollar strings are used by default for all new lists and any imported lists will already be converted to dollar strings. - Likewise, rip out the password scheme stuff, since cleartext passwords can never be exported, so we might as well always include the member's hashed password. - Fix exporting to stdout when that stream can only handle ascii by wrapping stdout in a utf-8 codec writer. Other changes: - add a missing import to HTTPRunner.py - Convert GUIBase.py to use Defaults.* for constants instead of mm_cfg.* - Remove pre-Python 2.4 compatibility from Utils.py. We've already said Python 2.4 will be a minimum requirement. - Change the permissions on the global password file. The default 007 umask is used and should be good enough. - bin/newlist adds the ability to specify the password scheme (or list the available schemes) for the list owner password. It is not possible to set the scheme on a per-list basis. bin/mmsitepass does the same, but for the site and list creator passwords. - Fix a nasty problem with bin/import. The comment in the code says it best: # XXX Here's what sucks. Some properties need to have # _setValue() called on the gui component, because those # methods do some pre-processing on the values before they're # applied to the MailList instance. But we don't have a good # way to find a category and sub-category that a particular # property belongs to. Plus this will probably change. So # for now, we'll just hard code the extra post-processing # here. The good news is that not all _setValue() munging # needs to be done -- for example, we've already converted # everything to dollar strings. - Set the 'debug' logger to logging.DEBUG level. It doesn't seem to make much sense for the debugging log to ignore debug messages.
* Remove most uses of the types module, in favor of isinstance checks againstbwarsaw2006-04-171-7/+7
| | | | | | the builtin types. Two still remain: a check against ClassType and a check against MethodType. Also, fix some hinky type comparisons to use isinstance() consistently.
* back porting from 2.1.6tkikuchi2005-08-281-4/+11
|
* FSF office has moved. chdcking in for MAIN branch.tkikuchi2005-08-271-1/+1
|
* Whitespace normalization.bwarsaw2002-08-151-3/+3
|
* handleForm(): A `return' should have been a `continue'. This fixesbwarsaw2002-08-141-1/+1
| | | | value setting when submitting an option's details page.
* _getValidValue(): Widget types EmailList and EmailListEx may alreadybwarsaw2002-05-251-0/+6
| | | | | | | be lists when this method is called from config_list. If so, just return the value unmodified. Also, add the Topics widget type so config_list doesn't bomb out.
* _postValidate(): New method which is called after all the formbwarsaw2002-04-111-8/+12
| | | | | | | | | | | attributes have been processed. This allows for the gui component to do sanity checks across inter-dependent values. Default is no-op. handleForm(): We don't need the `tag' arguments to addError() since the default is 'Error: '. Also, rearrange the exception logic so that the _setValue() call happens in an else and the except clauses don't need to return. This allows the gui component to still get a chance at _postValidate(), even if there were errors.
* _convertString(): Be slightly less anal about bad substitutionbwarsaw2002-03-071-5/+4
| | | | | | | | variables in the string. First, change the error message and make it a warning instead of an error (we're not going to discard their changes, and besides, it might have been caused by a change to a different property). Second, return the val so the change isn't thrown away.
* _getValidValue(): Fix the tests for EmailList and EmailListEx, andbwarsaw2002-02-281-9/+17
| | | | | also add a sanity check for any regular expressions (i.e. make sure that re.compile() doesn't fail on them).
* intermediatebwarsaw2002-02-261-0/+183