summaryrefslogtreecommitdiff
path: root/src/mailman/rest (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* * List styles are supported through the REST API. Get the list of availableBarry Warsaw2012-12-305-104/+158
| | | | | | | | | | | styles (by name) via `.../lists/styles`. Create a list in a specific style by using POST data `style_name=<style>`. (LP: #975692) Also: * Rewrite list.rst and some of configuration.rst to be more readable as documentation. Bad-path tests are moved to unittests. * Some improvements to printing lists as part of REST responses. This eliminates the ugly u''-prefixes on strings.
* Remove commented out pdb call.Barry Warsaw2012-12-261-1/+0
|
* * A user's password can be verified by POSTing to .../user/<id>/login. TheBarry Warsaw2012-12-263-2/+149
| | | | | | data must contain a single parameter `cleartext_password` and if this matches, a 204 (No Content) will be returned, otherwise a 403 (Forbidden) is returned. (LP: #1065447)
* * Finish rewrite of users.rst doctest.Barry Warsaw2012-12-263-134/+210
| | | | | | | * Migrate non-doctests to the test_users.py unittest. * Add more corner cases to the unittest. * Be sure to return a 404 when trying to get the address records of a non-existant user.
* initial refactoringBarry Warsaw2012-12-251-13/+12
|
* Flesh out a few more tests.Barry Warsaw2012-12-171-2/+34
|
* * Expose a REST API for membership change (subscriptions and unsubscriptions)Barry Warsaw2012-12-174-59/+386
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | moderation. (LP: #1090753) * Fixed `send_goodbye_message()`. (LP: #1091321) Also: * Rewrite and refactor request.rst into better documentation, moving non-good-path tests into unittests. This doctest now only describes the IRequests API, while the bulk of the moderation documentation now lives in moderator.rst. * When a subscription request is pended, the `delivery_mode` key is now just the enum item's name, instead of the str() of the enum (which would include the class name). We know it's always going to be a DeliveryMode enum. * Refactor out the welcome_message calculation from the welcome_message_uri, since the same algorithm can apply to goodbye_message_uri. * When a _Request is retrieved, include the RequestType enum name in the data dictionary (if there is one) under the `_request_type` key. Some APIs find this useful, but it's not directly returned otherwise. * For held messages via the REST API, flatten the `data` key into the top-level JSON representation, exposing some of the _mod_* keys under their non-_mod_* equivalent. Ignore _mod_* keys we don't care about. This is an API change.
| * * Simplify moderator.rst and requests.rst so they serve a better purpose asBarry Warsaw2012-12-172-9/+18
| | | | | | | | | | | | | | | | | | | | 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-162-74/+250
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-153-9/+151
| | | | | | | | | | | | * 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().
* | * Allow the getting/setting of IMailingList.subject_prefix via the REST APIBarry Warsaw2012-12-172-0/+9
|\ \ | |/ |/| | | (given by Terri Oda). (LP: #1062893)
| * Adding subject_prefix to the api (and updating the docs to include it)Terri Oda2012-12-152-0/+9
|/
* * Deleting a user through the REST API also deletes all the user's linkedBarry Warsaw2012-11-053-2/+101
| | | | | | addresses and memberships. (LP: #1074374) Also: Clean up pyflakes warning by removing an obsolete __all__ entry.
* * Python 2.7 is not required. Python 2.6 is no longer officially supported.Barry Warsaw2012-10-317-182/+69
| | | | | The code base is now also `python2.7 -3` clean, although there are still some warnings in 3rd party dependencies. LP: #1073506
* * You can now verify and unverify an email address through the REST API.Barry Warsaw2012-09-223-3/+154
| | | | | | | POST to .../addresses/<email>/verify and .../addresses/<email>/unverify respectively. The POST data is ignored. It is not an error to verify or unverify an address more than once, but verifying an already verified address does not change its `.verified_on` date. (LP: #1054730)
* * You can now PUT and PATCH on user resources to change the user's displayBarry Warsaw2012-09-227-110/+295
| | | | | | | | | | | | | | name or password. For passwords, you pass in the clear text password and Mailman will hash it before storing. Also: * Major refactoring of validators for PUT and PATCH. Pull the common logic out of configuration.py and put it in a PatchValidator class in helpers.py. Also move GetterSetter to helpers.py * Add new exception classes RESTError, UnknownPATCHRequestError, ReadOnlyPATCHRequestError. These are used in the PatchValidator. * Added Validator.update() which works nicely for PATCH and PUT.
* * Add list_id to JSON representation for a mailing list (given by JimmyBarry Warsaw2012-09-223-17/+60
|\ | | | | | | | | | | | | | | Bergman). * The canonical resource for a mailing list (and thus its self_link) is now the URL with the list-id. To reference a mailing list, the list-id url is preferred, but for backward compatibility, the posting address is still accepted.
| * Add list_id to the REST API list representationJimmy Bergman2012-09-202-0/+4
|/
* * The link between members and the mailing lists they are subscribed to, isBarry Warsaw2012-09-046-72/+72
| | | | | | | | | | | | | | | 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)
* * Expose `archive_policy` in the REST API. Contributed by AlexanderBarry Warsaw2012-08-202-0/+8
| | | | Sulfrian. (LP: #1039129)
* * Removed obsolete `IMailingList` attribute `generic_nonmember_action.Barry Warsaw2012-08-192-4/+0
| | | | (LP: #975696)
* * The policy for archiving has now been collapsed into a single enum, calledBarry Warsaw2012-07-262-10/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-252-9/+9
|/ | | | | | include_list_post_header -> allow_list_posts Also add a bunch more migration tests.
* * `passlib`_ is now used for all password hashing instead of flufl.password.Barry Warsaw2012-07-021-2/+1
| | | | | | | | | | | | | | | | | | | | | | | The default hash is `sha512_crypt`. * Events renamed and moved: * `mailman.chains.accept.AcceptNotification` * `mailman.chains.base.ChainNotification` * `mailman.chains.discard.DiscardNotification` * `mailman.chains.hold.HoldNotification` * `mailman.chains.owner.OwnerNotification` * `mailman.chains.reject.RejectNotification` changed to (respectively): * `mailman.interfaces.chains.AcceptEvent` * `mailman.interfaces.chains.ChainEvent` * `mailman.interfaces.chains.DiscardEvent` * `mailman.interfaces.chains.HoldEvent` * `mailman.interfaces.chains.AcceptOwnerEvent` * `mailman.interfaces.chains.RejectEvent` * A `ConfigurationUpdatedEvent` is triggered when the system-wide global configuration stack is pushed or popped. * With the switch to `passlib`_, `[passwords]password_scheme` has been removed. Instead use `[passwords]path` to specify where to find the `passlib.cfg` file. See the comments in `schema.cfg` for details.
* Replace flufl.password with passlib, albeit with a wrapper.Barry Warsaw2012-06-272-10/+10
|
* - Remove an obsolete script.Barry Warsaw2012-04-221-2/+3
| | | | - Fix up one more use of config.db global.
* - Module modernization by adding the print_function() import.Barry Warsaw2012-04-225-52/+57
| | | | - Update many tests to use the transaction() context manager.
* Rename mailman.database.transaction.txn to ...transactional. Modernize theBarry Warsaw2012-04-201-9/+4
| | | | module, and use it in another convenient place.
* Merge the Pipermail eradication branch. The scrubber is also removed.Barry Warsaw2012-03-171-4/+1
|\ | | | | | | | | | | | | | | | | | | | | | | * 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
| * Eradicate Pipermail. Everything but the scrubber test works. That will takeBarry Warsaw2012-03-151-4/+1
| | | | | | | | some new APIs I suspect.
* | * Add property `IRoster.member_count`.Barry Warsaw2012-03-151-1/+1
| | | | | | | | | | Also, change the implementation of mailing list REST resource's member_count to use the more efficient implementation of IRoster.member_count.
* | * Mailing list resources now have a `member_count` attribute which gives theBarry Warsaw2012-03-154-4/+63
|\ \ | | | | | | | | | number of subscribed members. Given by Toshio Kuratomi.
| * | Unittest to show that adding members to a list is reflected in the rest apitoshio2012-03-151-1/+43
| | |
| * | Fix up doctests for the addition of volume and member_count to the rest api ↵toshio2012-03-152-1/+7
| | | | | | | | | | | | lists
| * | Export both the count of members and the latest digest volume in the rest apitoshio2012-03-151-0/+2
| | |
* | | Schema change. After discussion at Pycon, we decided to change "real_name" toBarry Warsaw2012-03-1512-42/+43
|/ / | | | | | | | | | | | | | | | | | | | | "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)
* / Do not taunt Happy Python 2.6 Fun Ball.Barry Warsaw2012-03-141-2/+2
|/ | | | | Clean up Python 2.7-isms and deprecations that break the tests suite on Python 2.6.
* * Mailing lists get multiple chains and pipelines. For example, normalBarry Warsaw2012-03-072-11/+10
| | | | | | | | | | | 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
* * A welcome message is sent when the user confirms their subscription viaBarry Warsaw2012-03-041-1/+1
| | | | | | | | | | 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-2/+2
| | | | | - 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-033-10/+80
| | | | | | | | | | | | | 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.
* * Major redesign of the template search system, fixing LP: #788309. $var_dirBarry Warsaw2012-03-031-0/+24
| | | | | | is now used when search for all template overrides, site, domain, or mailing list. The in-tree English templates are used only as a last fallback.
* Flesh out the moderation doctest.Barry Warsaw2012-01-301-9/+66
|
* * Held messages can now be moderated through the REST API. Mailing listBarry Warsaw2012-01-305-1/+363
| | | | | | | | | | | | | | | 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.
* copybumpBarry Warsaw2012-01-0118-18/+18
|
* Replace the password stuff with flufl.password.Barry Warsaw2012-01-012-5/+6
|
* * Stop adding the X-BeenThere header.Barry Warsaw2011-11-062-2/+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.
* Remove extraneous `test_suite()` functions. zope.testrunner willBarry Warsaw2011-10-306-48/+0
| | | | | | | | | automatically do the right thing in most cases. Keep test_suite() in test_documentation.py since these dynamically set up docs tests properly. Refactor test_passwords.py so that base class tests aren't bogusly run. Also, remove test_membership.py which was essentially disabled because it was testing the MM2 membership API.
* Sort the address memberships, first by mailing list fqdn, then by emailBarry Warsaw2011-10-231-2/+8
| | | | address, then by the integer value of the role enum.
* Finally, all doctests are named .rstBarry Warsaw2011-09-232-0/+0
|