summaryrefslogtreecommitdiff
path: root/Mailman/TopicMgr.py
diff options
context:
space:
mode:
authorbwarsaw2001-07-19 06:15:28 +0000
committerbwarsaw2001-07-19 06:15:28 +0000
commit710cbb1aa4ef5cd47fce015b172cb3f3704a7642 (patch)
treec29c61ee1fbb5320fca4916c7ddbe0c50bf76489 /Mailman/TopicMgr.py
parentdc09ef8a6a00fe392100c4068494002887fb7fa1 (diff)
downloadmailman-710cbb1aa4ef5cd47fce015b172cb3f3704a7642.tar.gz
mailman-710cbb1aa4ef5cd47fce015b172cb3f3704a7642.tar.zst
mailman-710cbb1aa4ef5cd47fce015b172cb3f3704a7642.zip
Major overhaul. Summary:
- There's no more GetConfigInfo() in the mixin classes. All admin ui categories and content comes from components in the new Mailman.Gui package. - All MailList attribute access for user-centric information is moved out of here into the OldStyleMemberships (a subclass, aka implementation of the MemberAdaptor interface). - An extension mechanism to MailList objects has been added. Drop a file called extend.py in the lists/<yourlist> directory; this gets execfile'd, and the function extend() is called after the instance is initialized. Use this to override anything (e.g. the _memberadaptor attribute). - Lots of code reorganization. Specific changes: MailList subclasses: Added TopicMgr __init__(): Don't call MailCommandHandler.__init__() explicitly. Instead, loop through base classes calling their __init__()'s if they have them. Initialize _memberadaptor to be an OldStyleMemberships instance. After the instance has been locked and loaded <snort!> execfile extend.py and run its extend() function, if it has one. InitTempVars(): Like __init__(), cycle through all base classes, calling each's InitTempVars() if they have one. Also, instantiate the gui components by dir'ing the Gui package and instantiating each callable not prefixed by _ (they will be the individual classes). GetMembers(), GetDigestMembers(), GetDeliveryMembers(), GetDigestDeliveryMembers(), __AddMember(), GetUserSubscribedAddress(), GetUserCanonicalAddress(), GetUserOption(), SetUserOption(), FindUser(): Removed. __getattr__(): Added for auto-delegation first to the _memberadaptor, and then to the gui components. __repr__(): Change the printable representation slightly so that "(unlocked)" is printed if the list is unlocked, and also to not include the class/module name. Also use %x format instead of coercing the id to hex(). InitVars(): Add usernames and passwords dicts for traditional membership management. Like __init__(), cycle through all base classes, calling each's InitVars() if they have one. Set self.password here instead of in SecurityManager's InitVar(). GetConfigCategories(): New method which returns a CategoryDict instance (subclass of UserDict), containing the order ADMIN_CATEGORIES as extracted from the gui components GetConfigCategory() methods. GetConfigSubCategories(): For a particular category, get the list of subcategories by calling a gui component's GetConfigSubCategories() method if it has one. GetConfigInfo(): Delegate to gui components. Save(): Ignore attributes if their name starts with _ (like before) or if their value type is MethodType. AddMember(): Rewrite to use (Python 2.2's) rfc822.parseaddr() which supplants Utils.ParseAddrs(). We also don't remove spaces from the name any more, but we do still lowercase the domain. Also, IsMember() -> isMember(). Call ApprovedAddMember() passing in the fullname. Same with HoldSubscription(). ApprovedAddMembers(): Use MemberAdaptor API, and rfc822.parseaddr(). DeleteMember() -> ApprovedDeleteMember(). Also rewrite to use MemberAdaptor API. ChangeMemberName(): New method which changes a member's real name, both for this list, and globally. ChangeMemberAddress(), ApprovedChangeMemberAddress(): Use MemberAdaptor API. ProcessConfirmation(): DeleteMember() -> ApprovedDeleteMember(). GetPreferredLanguage(): Allow name to default to None, meaning return the list's preferred_language.
Diffstat (limited to 'Mailman/TopicMgr.py')
0 files changed, 0 insertions, 0 deletions