summaryrefslogtreecommitdiff
path: root/src/mailman/app
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'pluggable-workflows' into pluginpluginJ08nY2017-08-079-2126/+38
|\
| * Add more tests for coverage.J08nY2017-08-071-1/+1
| |
| * Save workflows name in Pendable PEND_TYPE.J08nY2017-08-071-6/+9
| | | | | | | | | | | | - Saves workflow name in as Pendables type, so that it is correctly restored even if the MailingLists sub/unsub policy changes while it was pending.
| * Move workflow tests to mailman.workflows.J08nY2017-08-073-1429/+0
| |
| * Remove [Un]SubscriptionConfirmationNeeded events, send msg in workflows.J08nY2017-08-072-43/+1
| |
| * Migrate the [un]subscription_policy attribute.J08nY2017-08-076-220/+217
| | | | | | | | | | | | | | | | | | - This is quite a huge commit, since it changes the type of the MailingList.subscription_policy and unsubscription_policy attributes to the new names of pluggable workflows, in all occurences. - Also adds a migration to migrate the attributes to the new types. - Adds tests for the migration.
| * Save the complete workflow stack, not only last step.J08nY2017-08-071-1/+1
| |
| * Make workflows implement their interfaces.J08nY2017-08-071-3/+3
| |
| * Move workflows from app.subscriptions to workflows.builtin.J08nY2017-08-071-473/+7
| |
| * Create mailman.workflows package. Move base Workflow there.J08nY2017-08-073-159/+8
| | | | | | | | | | - Also introduce IWorkflow, ISubscriptionWorkflow, IUnsubscriptionWorkflow.
* | Fix coverage, deprecate, but run non-plugin (post|pre)_hooks.pluggable-componentsJ08nY2017-08-071-5/+45
| |
* | Add REST-ability to plugins.J08nY2017-08-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Adds the rest_object method to the IPlugin interface. This method is called by the REST api to route requests to the plugin's REST api. All attributes are proxied, so the object becomes a true REST object in the ObjectRouter hierarchy. For example see the RESTExample and ExamplePlugin classes in mailman.testing.plugin. The plugin might return None from this method, in which case all calls to it's REST api route will return 404 NotFound. - Adds new routes to the REST api. For version >= 3.1: - /3.1/plugins Returns a dictionary with plugin names as keys, and their configs as values. - /3.1/plugins/<plugin_name> Proxies everything to plugin's rest_object, if plugin with such name exists and provides a non-null rest_object, else NotFound.
* | Add per-plugin hooks, add docs about plugins.J08nY2017-08-071-64/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Removes pre_hook, post_hook and ext_dir. With the latter being unused. Warns on startup if the hooks are present in config. - Adds IPlugin interface with pre_hook and post_hook methods. - Adds 'class' config parameter to plugins, which can be set to a class implementing the IPlugin interface, it will be initialized once on Mailman's startup, then before the DB setup the pre_hook will be run, after DB and other components the post_hook will be run. Plugin instances are stored in the config.plugins dict, with keys being their configuration section names.
* | Add pluggable components.J08nY2017-08-072-2/+2
|/ | | | | | | | | | | | | | | | | - Adds the notion of a 'plugin'. - A plugin has a package path and a flag specifying whether it's enabled or not. - Adds a find_pluggable_components function similar to the find_components one. This one dynamically searches not only the mailman package but all of plugins. - e.g. find_pluggable_components('rules', IRule) finds all IRule components in mailman.rules but also in example_plugin.rules for plugin names example_plugin. - Uses the find_pluggable_components function in place of find_components when searching for Rules, Handlers, Chains, EmailCommands, and Styles.
* Rename metadata key for clarityBarry Warsaw2017-08-042-16/+64
|
* Convert to click for CLI optionsBarry Warsaw2017-07-223-4/+7
|
* Provide a better way to avoid instantiating some componentsBarry Warsaw2017-06-171-9/+2
|
* Ensure the held message subject is a string.Mark Sapiro2017-05-241-1/+2
|
* Fix the template name of the welcome message.Barry Warsaw2017-05-241-2/+3
| | | | | | | | | | | | | | | | | We did not previously complete the renaming of the templates. Rename: * user:ack:welcome -> list:user:notice:welcome * user:ack:goodbye -> list:user:notice:goodbye The new names are what are actually used in send_welcome_message() and send_goodbye_message() so the old names were actually never used. NOTE: If you added welcome or goodbye templates through REST from git head, the old names will not be used. Given that this wasn't a feature in 3.0, and the above use case is very unlikely, I've decided not to do a migration. If anybody is affected, the changes can be made manually in withlist. Closes: #337
* Fix two problems and close #260Barry Warsaw2017-04-221-1/+18
|
* Moved InvalidListNameError class definition to mailman.interfaces.mailinglist.Mark Sapiro2017-02-202-13/+6
| | | | | Added more documentation on config.mailman.listname_chars. Made a couple of minor tweaks.
* Updated rest/lists.py to handle list name error exceptions and addedMark Sapiro2017-02-192-1/+5
| | | | | | tests for for the exceptions. Enhanced the InvalidListNameError exception to return the invalid name.
* Replaced assertEqual with assertRegex to account for difference in errorMark Sapiro2017-02-191-5/+6
| | | | messages between python versions.
* Made the allowable list name characters configurable.Mark Sapiro2017-02-192-1/+38
|
* Implemented stricter listname validation.Mark Sapiro2017-02-192-2/+23
|
* Skip a test if run as root, as can happen with GL shared runnersBarry Warsaw2017-02-191-0/+1
|
* Bump copyright years.Barry Warsaw2017-01-0424-24/+24
|
* Fix flake8 errors.Mark Sapiro2016-12-042-2/+4
|
* Fix tests for test-owner instead of moderator's address.Mark Sapiro2016-12-042-2/+2
|
* Merge gitlab.com:mailman/mailman into to_moderatorsMark Sapiro2016-12-0413-13/+13
|\
| * Use `atpublic` for @public instead of internal copy.Barry Warsaw2016-11-2913-13/+13
| |
* | Remove to_moderators.Mark Sapiro2016-12-041-1/+1
| |
* | Rrmove to_moderators.Mark Sapiro2016-12-041-2/+2
|/
* Minor style cleanup.Barry Warsaw2016-11-241-23/+23
|
* Fix an API callAurélien Bompard2016-11-211-1/+1
|
* Run the workflows at the end of the tests to clean things upAurélien Bompard2016-11-211-0/+5
|
* Handle a missing user when a workflow is restored.Aurélien Bompard2016-11-212-1/+39
| | | | | | Between the creation of a subscription workflow and its approval, the user may have been merged with another user. In this case, use the associated address to find the new user.
* Workflow: support dependencies between attributesAurélien Bompard2016-11-212-2/+59
| | | | | | Restore the attributes in the order they are declared in `SAVE_ATTRIBUTES` to allow for dependencies between attributes (required by the `SubscriptionWorkflow`).
* Fix a flake8 error.Barry Warsaw2016-11-131-1/+1
|
* Closes: #68Barry Warsaw2016-11-134-13/+25
| | | | | Messages sent to the list's moderators now include the actual recipient addresses. Given by Tom Briles.
* Issue 68: send messages to list moderators when tomoderators=TrueTom Briles2016-10-312-2/+15
|
* 99% test coverage.Barry Warsaw2016-10-215-34/+188
| | | | | | | | | Also: * Ignore coverage in the testing submodule. * Remove some unreachable code. * Spelling. * Fix a bug in run_thru().
* Refactor.Barry Warsaw2016-10-182-105/+38
|
* Simplify the implementation.Barry Warsaw2016-10-177-85/+45
| | | | | | | | | | | | | | | | | | | | | | This merges the SubscriptionManager and UnsubscriptionManager into a single SubscriptionManager implementation that handles both register() and unregister(). This allows us to use direct class-based adaptation instead of the more clunky getAdapter() API. We can also eliminate the funky _get_workflow() implementation detail. This has a couple of side-effects. .confirm() must lookup the token in the pendings database and pull out the pending type, dispatching to the proper class depending on the type, or raising a LookupError if the token is None or there is no pendable associated with the given token. This feels like an acceptable trade-off. However, this *also* means that IWorkflowStateManager must lose its 'name' argument in its methods. That's because we won't actually know the name until its too late. Honestly, the name wasn't providing much value anyway (it was always the subclass's name), so losing that seems fine too. The complication here is that the name was a primary key in the 'workflowstate' table, so we need to add its removal in the database migration.
* flake8 fixes.Barry Warsaw2016-10-163-4/+3
|
* Another fix.Barry Warsaw2016-09-161-3/+3
|
* Split registration (subscription) and unsubscription:Barry Warsaw2016-09-133-18/+25
| | | | | | | | * events * notices * handlers Also, be sure to do only one `leave` command per email.
* Fix more tests.Barry Warsaw2016-09-112-3/+3
|
* Collapse two doctests into one.Barry Warsaw2016-09-111-0/+1
| | | | Also, fix the return value of .unregister(), and make the tests pass.
* More test fixes.Barry Warsaw2016-09-092-12/+14
|