summaryrefslogtreecommitdiff
path: root/src/mailman/rest/members.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix two problems and close #260Barry Warsaw2017-04-221-3/+4
|
* Bump copyright years.Barry Warsaw2017-01-041-1/+1
|
* Use `atpublic` for @public instead of internal copy.Barry Warsaw2016-11-291-1/+1
|
* Simplify the implementation.Barry Warsaw2016-10-171-3/+2
| | | | | | | | | | | | | | | | | | | | | | 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.
* IWorkflowManager -> ISubscriptionManagerBarry Warsaw2016-09-011-3/+4
|
* CheckpointingBarry Warsaw2016-09-011-1/+1
|
* Intermediate CommitAbhilash Raj2016-09-011-3/+3
|
* allow_none -> allow_blankBarry Warsaw2016-07-121-1/+1
|
* REST: allow setting a member's moderation_action to NoneAurélien Bompard2016-07-121-1/+1
|
* Better handling of the REST API plumbing.Barry Warsaw2016-06-281-2/+2
| | | | | | | | | * Add a version_info field which is a better way to do ordered comparisions of the API version. * All subresources now get their .api attribute set automatically, if they are passed back through the ObjectRouter. No more fiddling with context['api'] (unless of course, they don't make a roundtrip through the main ObjectRouter loop.
* Revert a few incorrect renames.Barry Warsaw2016-04-031-15/+15
|
* Don't pass `api` when it's readily available.Barry Warsaw2016-04-031-11/+7
|
* API consistency.Barry Warsaw2016-04-031-17/+17
|
* Allow fall backs for moderation actions.Barry Warsaw2016-04-011-1/+1
| | | | | | | | | The `moderation_action` for members and nonmember can now be ``None`` which signals falling back to the appropriate list default action, e.g. `default_member_action` and `default_nonmember_action`. Given by Aurélien Bompard. Closes #189
* Members and nonmembers moderation action fallbackAurélien Bompard2016-03-311-1/+3
| | | | | | | | Members and nonmember's moderation action should be None by default, and in that case the moderation rule should fallback to the mailing list's default action. Fixes: #189
* Clean up the rest directory.Barry Warsaw2016-03-251-13/+5
|
* Closes #199Barry Warsaw2016-03-221-2/+2
| | | | | New subscription requests are rejected if there is already one pending. With thanks to Anirudh Dahiya. (Closes #199)
* Caught exception at the right placeAnirudh Dahiya2016-03-221-5/+4
|
* Removed unnecessary commentsAnirudh Dahiya2016-03-221-9/+0
|
* Incorporates suggested changesAnirudh Dahiya2016-03-221-3/+10
|
* Add necessary comment explaining the modificationAnirudh Dahiya2016-03-221-0/+1
|
* Block duplicate Subscription requestsAnirudh Dahiya2016-03-221-1/+6
|
* Fix #198 - duplicate owner subscription errorBarry Warsaw2016-03-051-1/+3
| | | | | | Trying to subscribe an address as a list owner (or moderator or nonmember) which is already subscribed with that role produces a server error.
* Add AlreadySubscribedError Exception for better error messageAnirudh Dahiya2016-03-051-0/+3
|
* Give a meaningful message when a banned member tries to joinAurélien Bompard2016-01-201-0/+3
|
* Add NEWS and tweak.Barry Warsaw2016-01-131-2/+3
|
* Member search can be done using GET requestsAurélien Bompard2016-01-131-1/+13
|
* Just a little more UUID conversion convenience.Barry Warsaw2016-01-131-11/+5
|
* Use common idiom for converting the UUID.Barry Warsaw2016-01-131-10/+11
| | | | Wrap lines.
* Fix getting a list member through the 3.1 APIAurélien Bompard2016-01-131-11/+13
|
* Refactor API differences into a separate class.Barry Warsaw2016-01-131-5/+6
| | | | | | | | | | | We now have an IAPI interface which defines methods to convert to/from UUIDs to their REST representations, and to calculate the API-homed full URL path to a resource. Add implementations API30 and API31 to handle the two different implementations so far. This also simplifies the various path_to() calls. Also: Add support for diff_cover to tox.ini to check that all differences against the master branch have full test coverage.
* Refactor API contexts.Barry Warsaw2016-01-131-23/+15
| | | | | | Rather than sprinkle API version string tests all over the place, create an IAPI interface which encapsulates the differences between API 3.0 and 3.1, and arrange for this to be used to convert to and from UUIDs.
* Boost coverage.Barry Warsaw2016-01-091-3/+0
|
* Additional refactoring to use the QuerySequence wrapper, so that we can stillBarry Warsaw2016-01-061-1/+1
| | | | | | 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-3/+3
|
* Boost coverage.Barry Warsaw2016-01-031-1/+1
| | | | | | Use coverage.ini to ignore a few common idioms, so as to reduce code clutter. Invoke coverage slightly differently in the tox.ini.
* Happy New Year.Barry Warsaw2016-01-021-1/+1
|
* Cleanups, corner case fixes, and coverage.Barry Warsaw2015-12-311-6/+2
|
* Major push for completing issue #121. Now in API 3.1, all UUIDs must be theBarry Warsaw2015-12-301-20/+34
| | | | | | | | | hex representations of a UUID, not the int representation. Also: * Some general code cleanup. * Fix issue 185 (REST server crash when subscribing a user without a preferred address).
* Allow a Member's moderation_action to be changed by the REST API.Aurélien Bompard2015-12-081-5/+11
| | | | Cleanups by Barry. Closes !67
* Rework pagination to fix the 'start' and 'total_size' valuesAurélien Bompard2015-11-041-2/+1
|
* * REST API version 3.1 introduced. Mostly backward compatible with versionBarry Warsaw2015-07-181-11/+12
| | | | | | 3.0 except that UUIDs are represented as hex strings instead of 128-bit integers, since the latter are not compatible with all versions of JavaScript.
* Plumb the subscription policy through the REST API.Barry Warsaw2015-04-151-22/+126
|
* * Member resource JSON now include the ``member_id`` as a separate key.Barry Warsaw2015-02-131-1/+3
|
* We don't need the 'six' package any more.Barry Warsaw2015-01-041-7/+5
|
* Bump copyright years.Barry Warsaw2015-01-041-1/+1
|
* Remove huge amounts of now unnecessary file boilerplate.Barry Warsaw2014-12-221-7/+3
|
* Checkpointing.Barry Warsaw2014-11-301-5/+7
| | | | | | | | | | By using `six` I think I have most of the imports squared away. There's probably still uses of `unicode` built-ins that need fixing. The idea is to first get the test suite running (which it doesn't yet), and then to fix tests. There's a bug in lazr.config which requires us to patch it for now.
* Refactor so that most modules don't need to import falcon, and so fewerBarry Warsaw2014-08-141-32/+21
| | | | | unnecessary changes are needed for upstream falcon to support restish-ish traversal.
* Complete the conversion from restish to falcon, modulo a clean up pass. AllBarry Warsaw2014-08-141-31/+37
| | | | REST tests pass. This requires an as yet unmerged internal change to falcon.