summaryrefslogtreecommitdiff
path: root/src/mailman/app/subscriptions.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix two problems and close #260Barry Warsaw2017-04-221-1/+18
|
* Bump copyright years.Barry Warsaw2017-01-041-1/+1
|
* Merge gitlab.com:mailman/mailman into to_moderatorsMark Sapiro2016-12-041-1/+1
|\
| * Use `atpublic` for @public instead of internal copy.Barry Warsaw2016-11-291-1/+1
| |
* | Rrmove to_moderators.Mark Sapiro2016-12-041-2/+2
|/
* Handle a missing user when a workflow is restored.Aurélien Bompard2016-11-211-1/+2
| | | | | | 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.
* Closes: #68Barry Warsaw2016-11-131-2/+2
| | | | | Messages sent to the list's moderators now include the actual recipient addresses. Given by Tom Briles.
* 99% test coverage.Barry Warsaw2016-10-211-8/+10
| | | | | | | | | Also: * Ignore coverage in the testing submodule. * Remove some unreachable code. * Spelling. * Fix a bug in run_thru().
* Refactor.Barry Warsaw2016-10-181-104/+37
|
* Simplify the implementation.Barry Warsaw2016-10-171-51/+35
| | | | | | | | | | | | | | | | | | | | | | 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.
* Split registration (subscription) and unsubscription:Barry Warsaw2016-09-131-15/+21
| | | | | | | | * events * notices * handlers Also, be sure to do only one `leave` command per email.
* Fix more tests.Barry Warsaw2016-09-111-1/+1
|
* 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-091-4/+4
|
* A few more changes.Barry Warsaw2016-09-081-2/+3
|
* Fix many failures.Barry Warsaw2016-09-081-1/+18
| | | | Also, document more APIs.
* Remove workflowmanager.pyBarry Warsaw2016-09-021-3/+2
|
* CheckpointingBarry Warsaw2016-09-011-21/+28
|
* Checkpointing.Barry Warsaw2016-09-011-3/+298
|
* Intermediate CommitAbhilash Raj2016-09-011-1/+1
|
* Rebase mailman/mailman!180 and cleanup # noqaBarry Warsaw2016-07-281-1/+1
|
* New template system. Closes #249Barry Warsaw2016-07-161-6/+7
| | | | | The new template system is introduced for API 3.1. See ``src/mailman/rest/docs/templates.rst`` for details.
* Use flake8-respect-noqa plugin and fix more complaints.Barry Warsaw2016-04-011-1/+1
|
* Don't use `flake8: noqa`.Barry Warsaw2016-04-011-1/+1
| | | | | | | This suppresses all errors in the file. Use `noqa`, although pep8 doesn't honor this for all errors. There may be a plugin which helps.
* First massive round of cleanups.Barry Warsaw2016-03-231-13/+9
| | | | | | | | * Get rid of explicit __all__ settings and use the @public decorator. * Get rid of ^L's * Use expected_count argument for get_queue_messages() * Various code modernizations. * Other minor changes to make flake8 happy.
* Closes #199Barry Warsaw2016-03-221-6/+8
| | | | | New subscription requests are rejected if there is already one pending. With thanks to Anirudh Dahiya. (Closes #199)
* Correct spacingAnirudh Dahiya2016-03-221-4/+4
|
* Incorporates suggested changesAnirudh Dahiya2016-03-221-1/+7
|
* Complete the layer violation fixes by moving the SubscriptionService class toBarry Warsaw2016-01-061-108/+1
| | | | the mailman.model package.
* Additional refactoring to use the QuerySequence wrapper, so that we can stillBarry Warsaw2016-01-061-2/+9
| | | | | | use len() and slicing on SQLAlchemy query results. We also don't need to list()-ify the results in the tests. This isn't perfect, but at least it doesn't introduce yet another layer violation.
* Make the members request pageableAurélien Bompard2016-01-061-1/+1
|
* Happy New Year.Barry Warsaw2016-01-021-1/+1
|
* Make sure that Pendables always have a typeAurélien Bompard2015-12-161-1/+1
|
* Refactor the SubscriptionService.find_members method to be pure SQLAurélien Bompard2015-12-111-34/+25
| | | | | | | | | | Additional cleanups by Barry. Fix the SubscriptionService.find_members SQL query on PostgreSQL. Assert that an unsupported use case is actually unsupported. Various little clean ups.
* Branch his ready.Barry Warsaw2015-04-171-3/+7
|
* Check pointing new subscription moderation REST API.Barry Warsaw2015-04-171-2/+3
|
* Checkpointing.Barry Warsaw2015-04-161-1/+2
|
* Plumb the subscription policy through the REST API.Barry Warsaw2015-04-151-4/+11
|
* Give the SubscriptionWorkflow a member attribute which gets set to the memberBarry Warsaw2015-04-151-1/+2
| | | | | | | | once their subscription is completed. Remove some dead tests. Update an interface.
* Rewrite the subscription service doctest for the updated API.Barry Warsaw2015-04-151-0/+1
|
* The SubscriptionWorkflow and Registar classes now have both a token and aBarry Warsaw2015-04-151-48/+35
| | | | | | | | | | | | "token owner". The latter describes who owns the token --i.e. which phase of the workflow is being waited on. It can either be no one, the subscriber, or the moderator. Tokens and token owners are properly initialized and reset when the workflow is completed, so we always know which step of the process is being waited on. Also, remove ISubscriptionService.join() since this will now be handled by the IRegistrar adapter.
* Prevent replay attacks with the confirmation token.Barry Warsaw2015-04-151-0/+8
|
* Checkpointing.Barry Warsaw2015-04-141-1/+1
|
* The SubscriptionWorkflow class doesn't need to include the expiry date in itsBarry Warsaw2015-04-131-1/+4
| | | | | | | | | pendable data since that gets added automatically by the IPendings utility. After the user is subscribed, clean up the saved workflows and reset the token to None. Give the SubscriptionWorkflow a name property for convenience.
* SubscriptionPolicy is largely done, modulo bugs, and the unknown-unknown ofBarry Warsaw2015-04-131-21/+44
| | | | | | | | | | | | | course. This commit contains test failures because the next step is to hook everything up. Changes here include: * confirm.txt removes the URL since we can't know that. * Changes to the ConfirmationNeededEvent * Create the Pendable early in the workflow. * Clean up test. * Update IRegistrar docstring.
* Subscription workflows now support bans.Barry Warsaw2015-04-131-1/+6
|
* Subsume hold_subscription() functionality into the subscription workflow.Barry Warsaw2015-04-131-8/+48
| | | | | Specifically, log a message and send a notification to the list owners when a subscription is held and the list is so configured.
* Handle save/restore of the subscription workflow.Barry Warsaw2015-04-131-4/+68
| | | | | | | | | | To handle the case of restoring a saved workflow, allow the subscriber to be None in the constructor, but assert that it is not None after the first workflow step. Add setters/getters for handling save/restore. In the base workflow interface, rename key to token.
* Subscription workflow checkpointing.Barry Warsaw2015-04-091-57/+62
| | | | | | | | | | * TO DO: - hook up sending of confirmation - processing confirmations and continuing workflow - get tokens for saving workflows - integrate with RequestRecord - integrate with hold_subscription - after getting moderator approval, continue workflow
* Check pointingBarry Warsaw2015-04-061-3/+3
|