summaryrefslogtreecommitdiff
path: root/Mailman/Cgi/admin.py
Commit message (Collapse)AuthorAgeFilesLines
...
* change_options(): Filter out empty lines before we try to subscribebwarsaw2002-03-121-2/+2
| | | | the un-address that isn't on then <wink>.
* change_options(): Use splitlines() to find the addressesbwarsaw2002-03-121-5/+2
| | | | | | | (one-per-line) for the mass subscribe or mass unsubscribe. This should make this feature immune to native line endings, as splitlines() handles all the common line endings: CR for Mac, LF for Unix, CRLF for Windows.
* change_options(): When updating a member's options, take care tobwarsaw2002-03-061-2/+6
| | | | | ignore members that may have been deleted via other means during page hits.
* Patches to support duplicate suppression for explicit recipients,bwarsaw2002-03-051-7/+12
| | | | | | | | | | written by Ben Gertzfield, ported to MM2.1 by Marc MERLIN. Specifically, OPTCOLUMNS: Let's parameterize this. membership_options(): Add a column for the nodupes field.
* Document.addError()'s tag argument's default value is now "Error: " sobwarsaw2002-02-281-10/+7
| | | | change the call sites accordingly.
* get_valid_value(): Removed. This has all been moved into thebwarsaw2002-02-271-116/+4
| | | | | | | | | | | | | | | Mailman/Gui/GUIBase.py module. get_item_gui_value(): The gui component API has changed; use getValue() instead of GetValue(). change_options(): We can really simplify a lot of this method because the actual changing of the properties, value verification, and special overrides are now all handled in the gui components themselves. We now need only call out to the gui.handleForm() method. Eventually, the membership management page should use the same mechanism.
* add_error_message(): Converted to Document.addError().bwarsaw2002-02-231-26/+12
|
* main(), change_options(): Don't check for `request_login' in the cgibwarsaw2002-01-221-13/+4
| | | | | form data, because that key is obsolete. In change_options(), removed Scott's way old comment since I think it's no longer applicable.
* get_item_gui_value(): Filter out volatile attributes when usingbwarsaw2002-01-041-2/+3
| | | | getattr(), since they won't exist.
* show_results(): Don't allow thru-the-web deletion of the site list.bwarsaw2002-01-021-1/+3
|
* main(): Refactor calculation of QUERY_STRING values.bwarsaw2002-01-021-12/+56
| | | | | | | | | | membership_options(): Refactor calculation of adminurl. Also, add a hack to hide or display the table legend (normally hidden) using QUERY_STRING extensions. This may not yet play nicely with all the member chunking extensions. Add Dan Mick idea to include an indication of the reason for `nomail'. Use an abbreviation, described in the legend.
* main(): The last fix wasn't correct; it should have been fixed inbwarsaw2001-12-291-6/+1
| | | | OldStyleMemberships.py. Backing it out.
* main(): Small bug fix for when the admin has checked the unsub box andbwarsaw2001-12-291-1/+6
| | | | | accidently changed an option for the same user. We just ignore the NotAMemberError that can get raised.
* Make it easier for gui components to implement specializations of thebwarsaw2001-12-271-13/+16
| | | | | | | | | | category form data processing. The intention is to eventually push most of the special casing out of this script, where it's simply too hard to maintain. Specifically, get_item_gui_value(): If the gui component has a GetValue() method, call it to get the current value of the attribute. This lets us implement the seconds<->days mapping in the Bounce.py gui component.
* membership_options(): Implement user-selected disabled delivery. Usebwarsaw2001-12-191-9/+25
| | | | | | | | | | getDeliveryStatus() instead of getMemberOption(). Fix the FIXME code which was doing a direct key search in mlist.members. This code is less efficient but plays nice with the MemberAdaptor API. change_options(): Handle the <user>_nomail option through the setDeliveryStatus() method instead of the setMemberOption() method. Disable BYADMIN.
* Forward port security patch from Mailman 2.0.8:bwarsaw2001-11-301-1/+3
| | | | | | | | | | Fixes to prevent cross-site scripting exploits. See http://www.cert.org/advisories/CA-2000-02.html Reported by zeno@cgisecurity.com Fix is to cgi.escape() any strings regurgitated from the url back to the browser in the html response.
* get_item_gui_value(), get_valid_value(): Added EmailListEx widgetbwarsaw2001-11-211-3/+6
| | | | | | which is just like EmailList except that it also allows "extended email addresses", really just regular expressions, which must start with a ^ (otherwise it's taken as a literal address).
* password_input(): Daniel Buchmann rightly points out that the textbwarsaw2001-11-051-4/+5
| | | | | explanation needs to be written to reflect the fact that password inputs are not on the general optinos page anymore.
* listinfo_overview(), admin_overview(): Simplify the test for virtualbwarsaw2001-11-021-3/+1
| | | | | host matching. We simply need to find the lowercased hostname in the web_page_url to find a match.
* show_results(), membership_options(): Two missed translationbwarsaw2001-10-271-6/+5
| | | | | | markings. Found by Szilard Vizi. password_inputs(): We don't need the <a name=...> bit anymore.
* get_item_gui_description(): Fixed i18n string. Found by Tokiobwarsaw2001-10-261-1/+1
| | | | Kikuchi.
* option_help(): If there is no elaboration, don't display thebwarsaw2001-10-201-4/+2
| | | | description three times (two should be enough <wink>).
* change_options(): A few code cleanups.bwarsaw2001-10-201-3/+1
|
* Some reorganization of the Membership List page:bwarsaw2001-10-191-14/+47
| | | | | | | | | | | - Legend goes back on top of the member list - A new "Additional Member Tasks" section which contains the search button (rearranged), and a new set moderator flag button - You can now toggle all members' moderate flag either on or off (defaults to default_member_moderation), including those members not visible on the screen.
* main(): category_suffix -> category, and get subcat from parts[0]bwarsaw2001-10-151-40/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass subcat to change_options() and show_results() calls. option_help(): Get both category and subcat from varhelp. Include the standard footer when no valid variable name is found. Be sure the form action url includes any subcat. Pass subcat to add_options_table_item() call. show_results(): category_suffix -> subcat. Be sure to include the subcat in the form action url. Pass subcat to the show_variables() call. show_variables(): Accept subcat, and pass it along to the add_options_table_item() call. add_options_table_item(): Accept subcat and pass it along to the get_item_gui_description() call. get_item_gui_description(): Accept subcat, and make sure that the VARHELP query url extension includes any subcat, otherwise the variable lookup will fail. member_options(): Include another column which contains the mod user-specific moderation bit. change_options(): Accept subcat, and be sure to pass that into the GetConfigInfo() calls. Also, set the user's Moderate flag based on the value of the user_mod key.
* show_results(): Fix the calculation for splitting the left column intobwarsaw2001-10-041-13/+8
| | | | | two subcolumns. Also, split the password entry fields into their own pseudo-subcategory (like members).
* change_options(): Only print the "Successfully Removed:" message ifbwarsaw2001-10-011-4/+5
| | | | there actually were any members removed.
* Convert from mimelib to email.bwarsaw2001-10-011-3/+1
| | | | | | | | Also, use cStringIO directly instead of our own hack-around StringIO module. admindb.py: Use ListAdmin.readMessage() to actually read the contents of the message from disk.
* change_options(): Give some feedback on who's been removed.bwarsaw2001-08-291-0/+6
|
* admin_overview(): Use get_domain() instead of hardcodedbwarsaw2001-08-201-2/+11
| | | | | | | | | DEFAULT_HOST_NAME to get the hostname. Also, do the same kind of virtual host filtering for the admin overview as we do in the listinfo overview. This more clearly separates the virtual domains (there perhaps should be a site overview).
* option_help(): Simplify the error message when the VARHELP variable isbwarsaw2001-08-171-13/+12
| | | | | | | invalid. password_inputs(): Add a <a name...> tag here so we can create a <a href="general#passwords"> link directly to this section.
* import types => from types import *bwarsaw2001-08-141-41/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure most tables have an explicit width of 100%, otherwise vertical Checkboxes cause the table to be squashed. show_results(): Split the "Configuration Categories" unordered list into two columns. Still not perfect, but better than having 11 members in one column on the left. "Edit the HTML for the public list pages" => "Edit the public HTML pages" get_item_gui_value(): Handle the new Checkbox widget. get_valid_value(): If widget type is Email, only attempt to validate the value if it is not the empty string. This fixes SF bug #219571, which prevented the reply_to_address field from being cleared. Also, teach this about the Checkbox widget type. Make sure that the value is a list. It'll be a scalar if exactly one of the checkboxes is selected, but we always treat it as a list. change_options(): When calling get_valid_value(), catch any EmailAddressErrors that can occur due to hostile or otherwise bad email addresses in the reply_to_address field. Print an error message in that case. add_error_message(): Change the way the `tag' argument is defaulted, so we can translate the default value.
* admin_overview(): Instead of using MAILMAN_OWNER, usebwarsaw2001-08-041-1/+1
| | | | Utils.get_site_email(). The former config variable is going away.
* change_options(): Always change the user's realname, not just if thebwarsaw2001-08-031-3/+2
| | | | | value is `true'. This allows us to delete the name and have it removed from the member database.
* Some UI improvements suggested by Michael Yount:bwarsaw2001-08-031-88/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | show_results(): Elaborate on the "Make your changes text...". Reorganize the category specific elements so that the "find member" section is added here instead of in membership_options(). This lets us put an hr in between these sections. Also, hyperlink "Python regular expression" to point to the library reference manual's description of regexp syntax. show_variables(): No longer needs the `form' argument, since it doesn't call membership_options() any more (that's called directly from show_results() instead). membership_options(): Just pass in the subcategory instead of calculating it here. It's figured out by show_results(). Also, don't add the "find member" section here; it's also added by show_results(). Reorganize the big member table to change the sense of the subscription check box. I've always hated the fact that you turn /off/ the subscr checkbox to unsubscribe somebody! Instead, now you turn on the unsub checkbox to unsubscribe them. To make this standout even more visually, the unsub column is moved to the left of the name/addr column. I still hate the abbreviations, but don't have any better ideas. This does improve things though because the members to be effected (i.e. unsubscribed) stand out much better now. mass_subscribe(), mass_remove(): More reorganization to put the questions in their own table cells. This helps line things up better, although it isn't perfect. Also, shrink the width of the text area a bit.
* show_results(): Ousmane Wilane noticed a missing i18n markup. Also,bwarsaw2001-08-021-2/+4
| | | | | include the `linktable' at the bottom of the page too. Not too pretty but it should avoid most scrollbar ping-ponging.
* Another step towards conversion to MemberAdaptor API.bwarsaw2001-07-291-14/+11
| | | | | | | | | | | | | | | | GetPreferredLanguage() -> getMemberLanguage(). Note this isn't finished yet since there are still some direct access to mlist.members. :( Use the UserDesc helper class. membership_options(): When calculating the length of the realname field, include the email addresses. Since this fits in the same table cell, the text box should be the max of the email addresses or realnames. Also, always include the realname TextBox, even if there is no realname for the user.
* change_options(): When sucking the subscribers out of the upload,bwarsaw2001-07-201-23/+29
| | | | | | | don't unquote the lines. Rewrite this function to not use ApprovedAddMembers() -- which has been removed -- but instead to loop over ApprovedAddMember(), keeping track of the results of each individual addition.
* A revamp to use the new category components, the new membership API,bwarsaw2001-07-191-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.
* Need to import sys!bwarsaw2001-07-061-14/+18
| | | | | | change_options(): Fixed the call to ApprovedAddMembers() so that we're correctly passing through the values of the form variables send_welcome_msg_to_this_batch and send_notifications_to_list_owner.
* main(), show_results(): Removed unnecessary global declarations.bwarsaw2001-07-031-5/+1
| | | | | | | | | main(): If the WebAuthenticate() fails, search for the form key `adminpw' -- not `admlogin' -- to decide whether to include the error message or not. The former is the cgi key for the password field, while the latter is the key for the submit button, which isn't included in a Mozilla posted form if the Enter key is hit instead of clicking on the button.
* Better syslog() calling conventions. Also, don't mark syslog messagesbwarsaw2001-06-271-2/+2
| | | | as translatable.
* admin_overview(): Applied David Champion's SF patch 401452 tobwarsaw2001-06-071-3/+9
| | | | alternatively highlight the list rows.
* Globally, WEB_HEADERCOLOR => WEB_HEADER_COLORbwarsaw2001-06-071-9/+9
| | | | add_error_message(): Use WEB_ERROR_COLOR instead of hardcoded #ff0000
* main(): Convert to the new world order for authentication. We don'tbwarsaw2001-05-311-87/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use Auth.authentication() anymore because mlist.WebAuthenticate() now does the job nicely, with all the acceptable authentication contexts passed as an argument. Also, when logging out, ZapCookie() takes an authentication context (in this case it's AuthListAdmin). main(), admin_overview(), option_help(), show_variables(), add_options_table_item(), membership_options(), submit_button(): We don't need to pass the document background color as an argument anymore. Other colors are no longer hardcoded, but taken from mm_cfg. show_results(): Small change to admindb link text; these are called moderator requests now. password_inputs(): Change this section so that it prompts for both changes to the list owner passwords, and the list moderator passwords, the latter of which gains access only to the pending requests page. change_options(): Because we no longer require the admin password in order to change the password (because it would have had to have been supplied in order to even get here), we can simplify the password change processing. We also need to add the moderator password change processing, and this should happen before the list owner password change processing, because the latter requires that the authorization cookie be regenerated.
* membership_options(): The search button string should be marked asbwarsaw2001-05-251-1/+1
| | | | translatable.
* admin_overview(): Application of SF patch #420396, submitted by Tokiobwarsaw2001-05-161-8/+6
| | | | | Kikuchi. Japanese translations have difficulty when the sentences are split.
* get_item_gui_description(): Can't add two Label() widgets, so formatbwarsaw2001-05-111-2/+2
| | | | them to plain text first.
* admin_overview(): Add a link to the site-wide `create' cgi page forbwarsaw2001-05-091-18/+23
| | | | | | | | | | | | | | | | creating new mailing lists. show_results(): Under "Other Administrative Activities", add a little bit of space before the Logout entry. Also, if OWNERS_CAN_DELETE_THEIR_OWN_LISTS is true, add a link just above Logout to the rmlist cgi script for deleting the mailing list. get_item_gui_description(): Use the new Label widget instead of inlining the <div> tags. password_inputs(): The PasswordBox widget now has a default size of TEXTFIELDWIDTH, which is too big for these particular fields. Crank the size down to 20.
* Update comments to sync with 2.0.5 branch.bwarsaw2001-05-031-19/+27
|