summaryrefslogtreecommitdiff
path: root/src/mailman/rest/configuration.py
Commit message (Collapse)AuthorAgeFilesLines
* Back port from the py3 branch:Barry Warsaw2014-12-291-226/+0
| | | | | | | | | | * You can access the system configuration via the resource path ``/3.0/system/configuration/<section>``. This returns a dictionary with the keys being the section's variables and the values being their value from ``mailman.cfg`` as verbatim strings. You can get a list of all section names via ``/3.0/system/configuration`` which returns a dictionary containing the ``http_etag`` and the section names as a sorted list under the ``sections`` key. The system configuration resource is read-only.
* s/restish/falcon/Barry Warsaw2014-11-151-29/+32
|\
| * Minor cleanups.Barry Warsaw2014-08-151-7/+4
| |
| * Refactor so that most modules don't need to import falcon, and so fewerBarry Warsaw2014-08-141-24/+17
| | | | | | | | | | 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-26/+39
|/ | | | REST tests pass. This requires an as yet unmerged internal change to falcon.
* Bump copyright years.Barry Warsaw2014-01-011-1/+1
|
* * Add ``reply_to_address`` and ``first_strip_reply_to`` as writableBarry Warsaw2013-03-201-0/+2
| | | | | | | | attributes of a mailing list's configuration. (LP: #1157881) Also: - template.py should only include 2013 for new copyright years. - Move some bad-path tests in configuration.rst to test_configuration.py
* Bump copyright years.Barry Warsaw2013-01-011-1/+1
|
* * Allow the getting/setting of IMailingList.subject_prefix via the REST APIBarry Warsaw2012-12-171-0/+1
|\ | | | | | | (given by Terri Oda). (LP: #1062893)
| * Adding subject_prefix to the api (and updating the docs to include it)Terri Oda2012-12-151-0/+1
|/
* * You can now PUT and PATCH on user resources to change the user's displayBarry Warsaw2012-09-221-93/+15
| | | | | | | | | | | | | | 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.
* * Expose `archive_policy` in the REST API. Contributed by AlexanderBarry Warsaw2012-08-201-0/+2
| | | | Sulfrian. (LP: #1039129)
* * Removed obsolete `IMailingList` attribute `generic_nonmember_action.Barry Warsaw2012-08-191-1/+0
| | | | (LP: #975696)
* * The policy for archiving has now been collapsed into a single enum, calledBarry Warsaw2012-07-261-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-251-1/+1
|/ | | | | | include_list_post_header -> allow_list_posts Also add a bunch more migration tests.
* Schema change. After discussion at Pycon, we decided to change "real_name" toBarry Warsaw2012-03-151-1/+1
| | | | | | | | | | | "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)
* * Mailing lists get multiple chains and pipelines. For example, normalBarry Warsaw2012-03-071-1/+1
| | | | | | | | | | | 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
* * Support downloading templates by URI, including mailman:// URIs. This isBarry Warsaw2012-03-031-2/+2
| | | | | | | | | | | | | 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.
* copybumpBarry Warsaw2012-01-011-1/+1
|
* * Stop adding the X-BeenThere header.Barry Warsaw2011-11-061-1/+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.
* * The IMailingList attribute ``host_name`` has been renamed to ``mail_host``Barry Warsaw2011-06-161-1/+1
| | | | | for consistency. This changes the REST API for mailing list resources. (LP: #787599)
* Complete the ability to change a subscription address, both internally and viaBarry Warsaw2011-04-251-3/+3
| | | | | | | | | | | | | | the REST API. (LP: #643949) * New resource path in REST API: /addresses/<email>/memberships gets all the memberships for a given email address. * In the REST API, PUTting or PATCHing a list configuration now returns a 204 (No Content) success code instead of a 200 success code with an empty body. * When a user is subscribed with their preferred address, changing the preferred address also changes all subscriptions. * When a user is subscribed with a specific address, their subscription can be changed to any verified address they control. * Use a new naming scheme for doctests with multiple mailing lists.
* Happy New Year.Barry Warsaw2011-01-011-1/+1
|
* Fairly significant change to the way member and nonmember moderation occurs.Barry Warsaw2010-12-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Now, nonmembers are represented by a separate roster of IMembers, the latter which has grown a `moderation_action` enum. When that action is `defer`, then the normal processing rules apply. Anything else and the `moderation` chain is jumped to for a shortcut to moderation (which may include immediate acceptance). TODO: handle unregistered nonmembers. Details: * The member-moderation rule is renamed to just moderation, and handles both members and nonmembers (though the latter must currently be registered). * The moderation rule is moved up in the builtin chain. It is now checked after `approved`, `emergency`, and `loop`, but before the normal moderation checks. This means that nonmember postings will be (by default) held much earlier. * IMember.is_moderated is removed. * IMember.moderation_action is added. * IMailingList.default_member_moderation is removed. * IMailingList.default_member_action and IMailingList.default_nonmember_action are added. * MemberRole.nonmember is added.
* This is part 1 of the merge of Jimmy Bergman's branchBarry Warsaw2010-12-281-1/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lp:~jimmy-sigint/mailman/restapi_additional_attributes Ostensibly, this adds support for a few additional attributes through the REST API: * default_member_moderation * generic_nonmember_action * member_moderation_action * reply_goes_to_list * send_welcome_msg * welcome_msg However, I had never previously fleshed out the conversion of default_member_moderation and member_moderation_action into the MM3 way of things. That is now done. Non-member moderation still needs to be done. Specific changes: * mailman.chains.base.Chain no longer self registers * The built-in chain gets a new link for checking 'member-moderation'. If this rule matches, it jumps to the 'member-moderation' chain, which checks member_moderation_action and returns a link that jumps to the appropriate terminal chain. * Chain initialization is done by the same auto-detection as rules, handlers, etc. The one tricky thing is that abstract base classes such as Chain and TerminalChainBase can't be instantiated. For now, there's an ugly special case to skip these. * default_member_moderation is now exposed in the IMailingList interface. * Member.is_moderated gets set in the constructor from the mailing list's default_member_moderation. * The 'moderation' rule is renamed 'member-moderation'. TODO: * Work out non-member moderation * Add member_moderation_action to IMailingList * Double check tests for reply_goes_to_list, send_welcome_msg, and welcome_msg
| * Add reply_goes_to_list, send_welcome_msg, welcome_msg, ↵root2010-10-131-0/+8
|/ | | | member_moderation_action, default_member_moderation and generic_nonmember_action to the writable attributes in the REST service
* Ugly, ugly, ugly hack to enable the non-standard HTTP verb PATCH for partialBarry Warsaw2010-09-011-8/+38
| | | | | | resource updates. None of the lower components (well, except restish) actually allows us to extend things for PATCH in any kind of principled way. I am the Kludge King.
* Refactor, and add a missing import.Barry Warsaw2010-08-231-1/+2
|
* Refactor the list configuration code via the REST interface, and flesh it outBarry Warsaw2010-08-231-0/+260
| | | | considerably.
* Remove more files that are unnecessary.Barry Warsaw2010-02-251-87/+0
|
* Oh FFS. lazr.restful 0.9.18 totally broke our shit by introducingBarry Warsaw2010-02-161-3/+18
| | | | | | | | | | | | | | multiversioned web services. In concept, that's a great idea, but in (current as of 0.9.18) practice it sucks because it /forces/ us to adopt multiversions when really I could care less. After gobs of painful experimentation, this passes all the tests. I guess that means it's right <wink>. Another, more reasonable fix is to re-order when logging is initialized. This is moved to the start of initialize_2() because in the test environment, we don't want to initialize the loggers until after the test configuration has been pushed. Otherwise, because of the changes to support the FHS, logging will go to the wrong place. This really only affects tests, since in operational mode, initialize always happens immediately one after another.
* Happy New Year.Barry Warsaw2010-01-011-1/+1
|
* Use lazr.smtptest instead of our own SMTPServer and test SMTPd.Barry Warsaw2009-10-151-1/+2
| | | | | Update the lazr.restful IWebServiceConfiguration implementation to include the new hop_by_hop_headers attribute, by way of BaseWSGIWebServiceConfiguration.
* Our first writable REST API! You can now create new domains through theBarry Warsaw2009-07-201-1/+2
| | | | | | | | | webserver. Fix the https/http urls. Add the adapter for HTTPCharsets so POSTs work properly. Nice little cargo cult from lazr.restful.
* Remove some unused stuff and pick some lint.Barry Warsaw2009-07-011-10/+2
|
* More REST server updates.Barry Warsaw2009-06-291-0/+2
| | | | | | | * Get rid of in-Python adapter registration in favor of ZCML. Eventually, I'd like to get rid of the ZCML. * Set the view_permission to None, but it's still not right. * Add IDomainSet and an adapter from Configuration to IDomainSet.
* Get rid of some useless stuff.Barry Warsaw2009-05-251-7/+7
|
* More tests for the REST server, this time, for the queue runner.Barry Warsaw2009-05-101-0/+1
| | | | | | | | | | | Add logging to the RESTRunner. Also, use pkg_resources.resource_stream() instead of .resource_string() where appropriate. Add a bunch of XXX comments for things I need to figure out about the Zope-ish parts of the lazr.restful implementation. Change __getitem__() api to _lookup().
* Moving closer now.Barry Warsaw2009-05-021-4/+5
| | | | | | | | | * Use the source version of lazr.restful until it's cheeseshopped. * IHasGet -> IResolvePathNames * path_override -> None; we don't need this * Simplify publication. We don't need anything fancy, except that what sucks is that it seems like we need to unwrap the security proxy in callObject() * Adaptation to IAbsoluteURL still doesn't work right.
* More checkpointing.Barry Warsaw2009-04-021-1/+1
|
* Checking pointing all the ZCA and restful wiring that I really don'tBarry Warsaw2009-04-021-0/+74
understand. Cargo culting FTW.