summaryrefslogtreecommitdiff
path: root/src/mailman/model
Commit message (Collapse)AuthorAgeFilesLines
...
* LP: #975692 phase 1Barry Warsaw2012-12-281-0/+1
| | | | | | | | | | | | | | | | | * Rework list style management. No more style priorities or matching.. Now, you name a style explicitly to apply and that's it. * create_list() now takes a `style` argument. * config file now names both a default style to use, and a set of paths to scan for IStyle instances. (This could be a model for other plugins.) * added IMailingList.style_name to record the last style applied, but this is going to be removed in subsequent revisions. Also: * Move find_components() and scan_module() from app/finder.py to utilities/modules.py * Cleaned up lifecycle.rst for better documentation. Some tests moved to test_lifecycle.py. * Remove some unnecessary test tearDown() code.
* * Two new events are triggered on membership changes: `SubscriptionEvent`Barry Warsaw2012-12-233-2/+32
| | | | | when a new member joins a mailing list, and an `UnsubscriptionEvent` when a member leaves a mailing list. (LP: #1047286)
* Fix cross-references.Barry Warsaw2012-12-171-1/+1
|
* * Simplify moderator.rst and requests.rst so they serve a better purpose asBarry Warsaw2012-12-172-808/+86
| | | | | | | | | | documentation. Move non-documentation tests into a separate unittest file. * Separate out the doctests for IRequest from the doctests for app/moderator.py and place the latter in a separate file. * Fix typo in app/membership.py (s/send_goodbye_msg/send_goodbye_message), but LP: #1091321 tracks more needed fixes in this area.
* Complete the exposure of subscription request moderation via REST (still needsBarry Warsaw2012-12-161-1/+3
| | | | | | | | | | | | | | | | | | a clean up pass and thorough unit testing). * Insert the RequestType enum name into the data dictionary returned by get_request(). Otherwise, there's really no good way to get that information, which several APIs need. * Flatten the data dictionary returned by held message JSON representations, into the JSON dictionary itself. Do a filtering and rename pass on the keys. - rename 'id' to 'request_id' - remove the redundant 'key' * Refactor some common stuff into _ModerationBase, although more refactoring is coming.
* Expose held subscription/unsubscription requests via the API.Barry Warsaw2012-12-151-0/+3
| | | | | | * hold_subscription(): Don't str(mode) to get a string representation, just mode.name since we know it is a DeliveryMode. This means we don't need to split the value later in handle_subscription().
* * Python 2.7 is not required. Python 2.6 is no longer officially supported.Barry Warsaw2012-10-311-2/+1
| | | | | The code base is now also `python2.7 -3` clean, although there are still some warnings in 3rd party dependencies. LP: #1073506
* DatabaseBarry Warsaw2012-10-161-29/+32
| | | | | | | | | | | | -------- * The `ban` table now uses list-ids to cross-reference the mailing list, since these cannot change even if the mailing list is moved or renamed. Interfaces ---------- * The `IBanManager` is no longer a global utility. Instead, you adapt an `IMailingList` to an `IBanManager` to manage the bans for a specific mailing list. To manage the global bans, adapt ``None``.
* * Schema migrations (LP: #1024509)Barry Warsaw2012-09-041-1/+1
| | | | - member.mailing_list -> list_id
* * The link between members and the mailing lists they are subscribed to, isBarry Warsaw2012-09-049-65/+117
| | | | | | | | | | | | | | | now via the RFC 2369 `list_id` instead of the fqdn listname (i.e. posting address). This is because while the posting address can change if the mailing list is moved to a new server, the list id is fixed. (LP: #1024509) + IListManager.get_by_list_id() added. + IListManager.list_ids added. + IMailingList.list_id added. + Several internal APIs that accepted fqdn list names now require list ids, e.g. ISubscriptionService.join() and .find_members(). + IMember.list_id attribute added; .mailing_list is now an alias that retrieves and returns the IMailingList. - list_id added (LP: #1024509)
* * Removed obsolete `IMailingList` attribute `generic_nonmember_action.Barry Warsaw2012-08-191-1/+0
| | | | (LP: #975696)
* * Non-unicode values in msgdata broke pending requests. (LP: #1031391)Barry Warsaw2012-08-171-6/+20
|
* * The policy for archiving has now been collapsed into a single enum, calledBarry Warsaw2012-07-262-9/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ArchivePolicy. This describes the three states of never archive, archive privately, and archive_publicly. (LP: #967238) Database -------- * Schema migrations (LP: #971013) - include_list_post_header -> allow_list_posts - news_prefix_subject_too -> nntp_prefix_subject_too - news_moderation -> newsgroup_moderation - archive and archive_private have been collapsed into archive_policy. - nntp_host has been removed. * The PostgreSQL port of the schema accidentally added a moderation_callback column to the mailinglist table. Since this is unused in Mailman, it was simply commented out of the base schema for PostgreSQL.
| * Working for SQLite:Barry Warsaw2012-07-251-1/+1
| | | | | | | | | | | | include_list_post_header -> allow_list_posts Also add a bunch more migration tests.
| * Refactor to better handling the difference between a testing database and aBarry Warsaw2012-07-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | production database. - Add an IDatabaseFactory interface with two named utility implementations. The initialization subsystem will either ask for the 'testing' or 'production' factory utility depending on whether we're in the test suite or not. The testing factory returns an IDatabase that can be _reset(). - initialize_2() now takes an optional `testing` argument, defaulting to False. The test ConfigLayer will pass in True. - Remove _reset() from the base database class. - The ModelMeta now adds a PRESERVE attribute to database classes. This defaults to False, meaning by default the test framework will reset the table. The Version table is preserved because it records the schema migrations. - Because of the above, we no longer need to support pre_reset() and post_reset() on migrations. Also, bin/mailman should allow the standard configuration file search algorithm to be used except when -C/--config is given.
| * trunk mergeBarry Warsaw2012-07-0624-266/+339
| |\ | |/ |/|
* | Replace flufl.password with passlib, albeit with a wrapper.Barry Warsaw2012-06-271-1/+1
| |
* | General code cleanup.Barry Warsaw2012-04-2521-72/+88
| | | | | | | | | | | | | | | | - Add explicit dependency on zope.event in setup.py. - Use Python 3 compatible syntax for specifying that a class implements an interface, i.e. the @implementer class decorator. - print_function futures. - Whitespace normalization.
* | - Module modernatizations (print function).Barry Warsaw2012-04-2214-182/+236
| | | | | | | | - Convert direct use of config.db global to use the @dbconnection decorator.
* | - Module modernization by adding the print_function() import.Barry Warsaw2012-04-221-11/+14
| | | | | | | | - Update many tests to use the transaction() context manager.
| * - Rename the model attributes.Barry Warsaw2012-04-081-7/+5
|/ | | | - news_moderation -> newsgroup_moderation
* * A `PasswordChangeEvent` is triggered when an `IUser`'s password changes.Barry Warsaw2012-04-072-2/+32
| | | | (LP: #975700)
* * An `AddressVerificationEvent` is triggered when an `IAddress` is verifiedBarry Warsaw2012-04-072-5/+40
| | | | or unverified. (LP: #975698)
* * A mailing list's *moderator password* is no longer stored in the clear; itBarry Warsaw2012-04-041-3/+3
| | | | | | | | | | | is hashed with the currently selected scheme. Also: - Simplify and rewrite the approved.rst doctest. Now just document the good path, and only describe its functionality using the Approved: header, which is the recommended header. - Greatly expand the unittests for the approved rule.
* ArchitectureBarry Warsaw2012-03-264-12/+11
| | | | | | | | | | | | | | | | | | | ------------ * Internally, all datetimes are kept in the UTC timezone, however because of LP: #280708, they are stored in the database in naive format. * `received_time` is now added to the message metadata by the LMTP runner instead of by `Switchboard.enqueue()`. This latter no longer depends on `received_time` in the metadata. * The `ArchiveRunner` no longer acquires a lock before it calls the individual archiver implementations, since not all of them need a lock. If they do, the implementations must acquire said lock themselves. Configuration ------------- * New configuration variables `clobber_date` and `clobber_skew` supported in every `[archiver.<name>]` section. These are used to determine under what circumstances a message destined for a specific archiver should have its `Date:` header clobbered.
* - Move some normal recipient tests to unittests.Barry Warsaw2012-03-231-4/+4
| | | | | | | | - Add unittests for owner recipients. There does eventually need to be some documentation about owner recipients. - Implement owner recipients handler. This includes moderators and owners (i.e. all the non-disabled the list administrators). - Changed the [mailman]site_owner setting in testing.cfg to noreply@example.com
* Add an owner chain and pipeline to the schema, model, and interface. PlumbBarry Warsaw2012-03-221-0/+2
| | | | this through the incoming runner.
* Merge the Pipermail eradication branch. The scrubber is also removed.Barry Warsaw2012-03-171-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | * Configuration variable `[mailman]filtered_messages_are_preservable` controls whether messages which have their top-level `Content-Type` filtered out can be preserved in the `bad` queue by list owners. * Configuration section `[scrubber]` removed, as is the scrubber handler. This handler was essentially incompatible with Mailman 3 since it required coordination with Pipermail to store attachments on disk. * Schema additions: - mailinglist.filter_action
| * * Pipermail has been eradicated.Barry Warsaw2012-03-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | * Configuration variable `[mailman]filtered_messages_are_preservable` controls whether messages which have their top-level `Content-Type` filtered out can be preserved in the `bad` queue by list owners. * Configuration section `[scrubber]` removed, as is the scrubber handler. This handler was essentially incompatible with Mailman 3 since it required coordination with Pipermail to store attachments on disk. * Schema additions: - mailinglist.filter_action
* | * Add property `IRoster.member_count`.Barry Warsaw2012-03-152-27/+198
| | | | | | | | | | Also, change the implementation of mailing list REST resource's member_count to use the more efficient implementation of IRoster.member_count.
* | Schema change. After discussion at Pycon, we decided to change "real_name" toBarry Warsaw2012-03-1510-57/+55
|/ | | | | | | | | | | "display_name" across the board. * `IMailingList.real_name` -> `IMailingList.display_name` * `IUser.real_name` -> `IUser.display_name` * `IAddress.real_name` -> `IAddress.display_name` * Schema changes: - real_name -> display_name (mailinglist, user, address)
* Clean up of style test code, along with refactoring of corner cases toBarry Warsaw2012-03-121-0/+3
| | | | unittests where they belong.
* * Mailing lists get multiple chains and pipelines. For example, normalBarry Warsaw2012-03-071-2/+2
| | | | | | | | | | | postings go through the `posting_chain` while messages to owners to through `owners_chain`. The default `built-in` chain is renamed to `default-posting-chain` while the `built-in` pipeline is renamed `default-posting-pipeline`. * Schema changes: - start_chain -> posting_chain - pipeline -> posting_pipeline
* Template indirection now also in effect for regular and digest headers andBarry Warsaw2012-03-041-4/+4
| | | | | | | | | | | | footers, using the same semantics and algorithm as for welcome and goodbye messages. Additional schema changes: - msg_header -> header_uri - msg_footer -> footer_uri - digest_header -> digest_header_uri - digest_footer -> digest_footer_uri
* Fix welcome_message_uri to do the placeholder interpolations guaranteed in theBarry Warsaw2012-03-042-1/+5
| | | | | | | | IMailingList documentation. Also: * `ILanguageManager.add()` returns the `ILanguage` object just created.
* * A welcome message is sent when the user confirms their subscription viaBarry Warsaw2012-03-042-78/+85
| | | | | | | | | | email. Also: - The user's Full Name is included on the To line of a welcome message. - Clean up some tests. - The welcome_message_uri for lists using the default style is set to mailman:///welcome.txt so a welcome message is sent by default.
* - Test welcome message notifications.Barry Warsaw2012-03-041-0/+1
| | | | | - welcome.txt is no longer inserted into subscribeack.txt. This latter is renamed to welcome.txt as the default welcome message.
* * Support downloading templates by URI, including mailman:// URIs. This isBarry Warsaw2012-03-032-5/+5
| | | | | | | | | | | | | used in welcome and goodbye messages, and supports both language and mailing list specifications. E.g. mailman:///test@example.com/it/welc.txt * Schema changes: - welcome_msg -> welcome_message_uri - goodbye_msg -> goodbye_message_uri - send_welcome_msg -> send_welcome_message - send_goodbye_msg -> send_goodbye_message * New `ITemplateLoader` utility.
* * The `join` email command no longer accepts an `address=` argument. ItsBarry Warsaw2012-02-291-4/+5
| | | | | | | | | `digest=` argument now accepts the following values: `no` (for regular delivery), `mime`, or `plain`. Also: - Fix get_queue_messages() to properly sort on the string representation of a header, since it could be a Header instance.
* * Schema migrations have been implemented.Barry Warsaw2012-02-121-1/+1
|
* Flesh out the moderation doctest.Barry Warsaw2012-01-301-1/+1
|
* * Held messages can now be moderated through the REST API. Mailing listBarry Warsaw2012-01-304-17/+75
| | | | | | | | | | | | | | | resources now accept a `held` path component. GETing this returns all held messages for the mailing list. POSTing to a specific request id under this url can dispose of the message using `Action` enums. * `IRequests` interface is removed. Now just use adaptation from `IListRequests` directly (which takes an `IMailingList` object). * `handle_message()` now allows for `Action.hold` which is synonymous with `Action.defer` (since the message is already being held). * `IListRequests.get_request()` now takes an optional `request_type` argument to narrow the search for the given request. - also, print_function is now a standard __future__ import. The template has been updated, but add this to modules as you edit them.
* * Remove previously deprecated `IListManager.get_mailing_lists()`.Barry Warsaw2012-01-271-6/+0
|
* * Add property `IListmanager.name_compoments` which returns 2-tuples forBarry Warsaw2012-01-272-5/+31
| | | | every mailing list as (list_name, mail_host).
* Three performance improvements.Barry Warsaw2012-01-271-6/+8
|
* Storm now has a "load hook" which we can use to restore the rosters when theBarry Warsaw2012-01-272-10/+9
| | | | | MailingList is loaded from the database. We need to call this explicitly in the constructor, but at least nothing else will ever need to call it.
* * Add property `IUserManager.members` to return all `IMembers` in the system.Barry Warsaw2012-01-262-0/+39
|
* copybumpBarry Warsaw2012-01-0127-27/+27
|
* Replace the password stuff with flufl.password.Barry Warsaw2012-01-011-2/+2
|
* * Stop adding the X-BeenThere header.Barry Warsaw2011-11-061-1/+0
| | | | | | | * Separate out the RFC 2369 header adding handler. * Dynamically calculate the `List-Id` header instead of storing it in the database. This means it cannot be changed. * Be sure to clean out any digest .mmdf files when the world is reset.