summaryrefslogtreecommitdiff
path: root/Mailman/pythonlib/cgi.py (unfollow)
Commit message (Collapse)AuthorFilesLines
2001-07-19A revamp to use the new membership API, and to be able to set/getbwarsaw1-49/+187
member's real names. Specifically, main(): IsMember() -> isMember(); FindUser()/GetUserSubscribedAddress() -> getMemberCPAddress() GetPreferredLanguage() -> getMemberLanguage() Support the printing of topic details when they click on the "Details" link after the topic name (works like admin interface's VARHELP). In the change-of-address stanza, add a check for the fullname field, which contains the member's real name. After extracting the fullname, new-address, and confirm-address fields, be more careful about including error messages, so that if the real name field is set or cleared, we ignore the address fields if they are both blank. Handle setting the member's name globally, just like a global change of address. DeleteMember() -> ApprovedDeleteMember() Add recognition of the ReceiveNonmatchingTopics flag to determine what the user wants for messages that match no topics (they can either receive them or ignore them). GetUserOption() -> getMemberOption() Add processing of user topic selections. SetUserOption() -> setMemberOption() and don't special case when setting digest deliver; setMemberOption() handles that properly. options_page(): Include the user's full name in presentable_user, as in "john.doe@dom.ain, John Doe". If there's no user name then just print the email address as before. "Change My Address" button -> "Change My Address and Name" Add replacements for the fullname box, and the topics option. IsMember() -> isMember() ChangeUserPassword() -> setMemberPassword() SetUserOption() -> setMemberOption() topic_details(): New method to include the topic details in the top information area.
2001-07-19main(): Extract the cgi data using keep_blank_values=1 so we'll knowbwarsaw1-4/+4
when the admin is trying to login with an empty password field. When WebAuthenticate() fails, check the `adminpw' cgi key to determine whether this was a login attempt, or the first visit of this link. show_requests(): SUBSCRIPTION pending records now include the supplied user real name (i.e. fullname), so use this when unpacking the tuple.
2001-07-19A revamp to use the new category components, the new membership API,bwarsaw1-113/+164
and to be able to set/get member's real names. Specifically, CATEGORIES: Don't hardwire these here. Instead they are extracted via mlist.GetConfigCategories(). main(): GetMembers() -> getRegularMemberKeys() get_config_options(): Removed. Use mlist.GetConfigInfo() instead. show_results(): Don't hardwire sub-categories. Instead get them from mlist.GetConfigSubCategories(). get_item_gui_value(): Added a new kind of gui widget, the `Topics' widget which includes at least three boxes (for topic name, regexp, and description), along with possibly a Delete button, an Add button, and an "add where" pull down menu. membership_options(): Instead of using GetMembers() and GetDigestMembers(), use the new membership API methods getMembers(), getMemberName(). Also use getMemberOption() instead of GetUserOption(). In the membership list, add a text box for the member's real name. change_option(): We now allow gui components to optionally handle the form data themselves. If the component has a HandleForm() method, it is called, passing the MailList object, the cgi form data structure, and the Document object. DeleteMember() -> ApprovedDeleteMember() SetUserDigest() -> setMemberOption(... mm_cfg.Digests, ...) SetPreferredLanguage() -> setMemberLanguage() SetUserOption() -> setMemberOption() Added setMemberName() to set the member's full name. get_config_options(): Removed.
2001-07-19Descend into the Gui subdirectory.bwarsaw1-1/+1
2001-07-19confirm(): Add optional argument `expunge' defaulting to true. Thisbwarsaw1-4/+10
is a flag specifying whether pending entries should be removed from the database or not, and will be used with the revamped confirmation web ui.
2001-07-19InitVars(): With the new mixin architecture, InitVars() needs to takebwarsaw1-19/+7
zero arguments, so we remove the crypted_password parameter. This means that self.password will be set in MailList instead. AuthContextInfo(): Instead of getting the user password directly out of self.passwords, use the API method getMemberPassword() -- which itself raises MMNotAMemberError if the user isn't a member of the list. ChangeUserPassword(): Removed. Use the new setMemberPassword() API method.
2001-07-19Some code re-organization.bwarsaw1-76/+29
ValidateEmail(): Add `/' to the list of _badchars in email addresses instead of making it bad only if it points to an existing directory (!). ParseAddrs(): Removed since rfc822.parseaddr() now works for all cases, according to RFC 2822 (but we'll need to supply the rfc822.py from Python 2.2 now).
2001-07-18All:bwarsaw5-212/+8
GetConfigInfo(): Removed. All admin ui gui elements are moved into components in the Mailman/Gui subdirectory. All membership related attribute access should use the MemberAdaptor API instead, e.g. IsMember() -> isMember() GetUserOption() -> getMemberOption() SetUserOption() -> setMemberOption() Also use ApprovedDeleteMember() instead of DeleteMember(). Deliverer.py: Remove last vestiges of os.environ['LANG'] Digester.py: SetUserDigest(): Removed. This is replaced by OldStyleMemberships's setMemberOption() method when flag == mm_cfg.Digests
2001-07-18Bump the version number to 2.1a3 and kick the DATA_FILE_VERSION to 30bwarsaw1-3/+3
so the new variables from versions.py will get installed.
2001-07-18NewVars(): Add the following attributes to MailList instances, if theybwarsaw1-0/+5
don't already have them: - topics: a list of all admin specified topics - topics_enabled: a flag specifying whether topics are enabled - topics_bodylines_limit: the number of lines of the body that the topic tagger should look for Subject: and Keywords: lines - one_last_digest: A hold over from an earlier time, this holds addresses of folks who switched from digest to regular delivery - usernames: holds the dictionary of email addresses to Real Names but if a user has no assigned Real Name, they have no entry in this dictionary.