summaryrefslogtreecommitdiff
path: root/src/mailman/app/subscriptions.py
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Remove [Un]SubscriptionConfirmationNeeded events, send msg in workflows.J08nY2017-08-071-41/+1
|
* Migrate the [un]subscription_policy attribute.J08nY2017-08-071-17/+8
| | | | | | | | | - 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.
* 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-071-2/+2
| | | | | - Also introduce IWorkflow, ISubscriptionWorkflow, IUnsubscriptionWorkflow.
* Convert to click for CLI optionsBarry Warsaw2017-07-221-1/+1
|
* 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
|