summaryrefslogtreecommitdiff
path: root/src/mailman/rest (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge passwords into restBarry Warsaw2011-04-081-7/+5
|\
| * encrypt_password(): New convenience function for ensuring that a password isBarry Warsaw2011-04-081-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | both encrypted according to a scheme, and a bytes object. add_member(): Use encrypt_password(). cli_members: Give the user a default, user-friendly password. Of course, this will be encrypted so it can't be retrieved, but it can be reset. Passwords are stored as bytes objects, not unicode now. ConfigLayer: Set the default test password scheme to cleartext. General test repair.
* | Move missing users test, and add a test for bogus email address.Barry Warsaw2011-04-061-7/+21
| |
* | Get users via email address through the REST API.Barry Warsaw2011-04-052-2/+24
| |
* | More fleshing out of the users REST API.Barry Warsaw2011-04-043-3/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add a 'uid factory' which allows us to return predictable unique ids for various testing purposes, e.g. user ids. This should work even in the case of cross-subprocess uid generation. * REST access to individual users, or the set of all users. * User objects now have a created_on attribute. * Users can be created through the web, but must have an email address. * Add a [devmode] 'testing' variable for communicating to qrunner subprocesses that we're running in testing mode. This allows us to coordinate factories and such in the qrunner processes. * layers.is_testing() for more consistent API. * Give AddressError a .address attribute for better diagnostics.
* | Basic REST users URL.Barry Warsaw2011-03-181-0/+41
| |
* | Merge users into restBarry Warsaw2011-03-181-1/+1
|\|
| * * Give users a unique, random, immutable user id.Barry Warsaw2011-03-181-1/+1
| | | | | | | | | | * Find users by user_id via the user manager. * Extend the repr of users to include the user id.
* | * Start fleshing out the REST API for users.Barry Warsaw2011-03-183-0/+62
|/ | | | * Remove mmsitepass.py - there is no more site password.
* Happy New Year.Barry Warsaw2011-01-0110-10/+10
|
* Because it was just to damn confusing, rename IAddress.address toBarry Warsaw2011-01-012-5/+5
| | | | | | IAddress.email and IAddress.original_address to IAddress.original_email. From now on we'll use "address" to talk about the IAddress object and "email" to talk about the textual email address.
* Fairly significant change to the way member and nonmember moderation occurs.Barry Warsaw2010-12-292-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Clean up from the previous commit.Barry Warsaw2010-12-281-3/+7
| | | | | | * member_moderation_action exposed in IMailingList * REST configuration test for member_moderation_action, send_welcome_msg, and welcome_msg.
* This is part 1 of the merge of Jimmy Bergman's branchBarry Warsaw2010-12-282-1/+29
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-132-0/+29
| | | | | | | | member_moderation_action, default_member_moderation and generic_nonmember_action to the writable attributes in the REST service
* | In the REST API, include the fqdn_listname and email address in the member'sBarry Warsaw2010-12-262-0/+44
| | | | | | | | JSON representation.
* | Insulate the test environment from the running environment. Sadly, the testBarry Warsaw2010-12-226-90/+90
|/ | | | | | ports are still hard coded. Also, 'bin/mailman info' dumps the REST root url and credentials.
* * We now have to disable site-packages because of LP: #659231Barry Warsaw2010-10-121-6/+26
| | | | * Provide a better example of how to use basic auth in the rest api call
* Add Basic Auth support to the REST API, given by Jimmy Bergman, with styleBarry Warsaw2010-10-112-4/+42
|\ | | | | | | corrections by Barry.
| * Add doctest for connecting using invalid credentials and some documentation ↵root2010-09-291-3/+22
| | | | | | | | regarding the basic auth for the REST server.
| * Add HTTP authentication to the REST APIroot2010-09-281-2/+14
| |
* | Fix the obvious errors identified by pyflakes. Skip false positives (mostlyBarry Warsaw2010-10-082-2/+1
|/ | | | | due to _() interpolation) and a few other problems that did not have immediately obvious fixes.
* More documentation fixes.Barry Warsaw2010-09-156-30/+60
|
* Doc fixesBarry Warsaw2010-09-071-1/+1
|
* Ugly, ugly, ugly hack to enable the non-standard HTTP verb PATCH for partialBarry Warsaw2010-09-014-15/+98
| | | | | | 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-237-75/+103
|
* Refactor the list configuration code via the REST interface, and flesh it outBarry Warsaw2010-08-2311-264/+399
| | | | considerably.
* Expose description in the interface and REST API.Barry Warsaw2010-08-122-0/+11
|
* Expose the autoreponse values in the IMailingList interface and REST API.Barry Warsaw2010-08-123-3/+127
|
* Expose administrivia in the IMailingList interface and REST API.Barry Warsaw2010-08-112-0/+8
|
* Expose anonymous_list and advertised in the IMailingList interface and in ↵Barry Warsaw2010-08-112-0/+18
| | | | the configuration REST API.
* Expose in the IMailingList interface, and in the REST API.Barry Warsaw2010-08-112-49/+75
| | | | | | | * admin_immed_notify * admin_notify_mchanges Sort acceptable aliases when returned from the API.
* Acceptable aliases as a sub-resource.Barry Warsaw2010-08-102-2/+119
|
* Placeholder for PATCH implementation.Barry Warsaw2010-08-102-5/+111
|
* Implement HTTP PUT (good path) for changing a list's configuration.Barry Warsaw2010-08-103-39/+130
|
* Access mailing list configuration via RESTBarry Warsaw2010-08-103-1/+124
| | | | | | | | | | * last_post_time -> last_post_at * protocol -> scheme * creation_date _> created_at * last_post_time -> last_post_at * Add an extended JSON encoder for datetimes * Be sure to initialize convert_html_to_plaintext and filter_content in the default style.
* Fixes bug LP: #601899; delete list function in rest server.Barry Warsaw2010-07-063-3/+64
|
* * Fix the bin/test -e/--stderr option to work with the currentBarry Warsaw2010-06-184-29/+72
| | | | | | | | | | | | | zope.testrunner. Actually, divorce it from the latter and handle the sys.argv sequence ourselves. * Added IMailingList.get_roster() which returns the named roster (from a MemberRole enum). * The start of an IMailingList doctest. This needs much more detail. * Move the subscribe() function from membership.txt into the mailman.testing.helpers. * Added new REST interface for getting all the members of a roster for a specific mailing list: .../lists/<list>/roster/<role>. Note that <role> is the plural form of the MemberRole enum.
* Because we'll often need to turn functions into restish matchers, add aBarry Warsaw2010-06-182-6/+14
| | | | convenient decorator.
* Ensure that email addresses with slashes in them can be registered.Barry Warsaw2010-06-172-2/+20
|
* Subscribing an already subscribed member via REST now returns a 409 errorBarry Warsaw2010-06-152-2/+2
| | | | (LP: #552917).
* Add POST validators.Barry Warsaw2010-03-015-24/+151
|
* Refactoring for common collection code.Barry Warsaw2010-02-257-70/+87
|
* Remove more files that are unnecessary.Barry Warsaw2010-02-253-283/+0
|
* Refactor both the mailing lists and membership REST wrappers.Barry Warsaw2010-02-257-246/+293
|
* Refactor domains into a separate file.Barry Warsaw2010-02-255-97/+122
|
* More refactoring:Barry Warsaw2010-02-256-52/+221
| | | | | | | * Rework the [webservice] section to be more useful to restish. * Get rid of the resource_type_link * Add and test some helpers. * Move the root resources to a different module.
* Refactoring the REST support by removing unnecessary stuff and moving otherBarry Warsaw2010-02-253-93/+94
| | | | | | stuff around. We no longer need APIValueError or IResolvePathNames. Also, refactor the creation of the REST server so that it could be used with other WSGI frameworks.
* Remove some files that are not needed for restish implementation.Barry Warsaw2010-02-254-253/+0
|
* Complete the conversion to restish. All the tests pass and we're now actuallyBarry Warsaw2010-02-245-102/+196
| | | | | | RESTful. We have to use httplib2 to get DELETE and PUT. This is a prototype and could still use much cleanup.