summaryrefslogtreecommitdiff
path: root/src/mailman/rest (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* * Preferences for addresses, users, and members can be accessed, changed, andBarry Warsaw2011-09-239-7/+530
| | | | | | deleted through the REST interface. Hierarchical, combined preferences for members, and system preferences can be read through the REST interface. (LP: #821438)
* * Getting the memberships for a non-existent address did not give a 404 errorBarry Warsaw2011-09-133-3/+64
| | | | (LP: #848103). Given by Stephen A. Goss.
* * Four new events are created, and notifications are sent during domainBarry Warsaw2011-09-021-0/+11
| | | | | | | | | | lifecycle changes: - DomainCreatingEvent - sent before the domain is created - DomainCreatedEvent - sent after the domain is created - DomainDeletingEvent - sent before the domain is deleted - DomainDeletedEvent - sent after the domain is deleted * Using the above events, when a domain is deleted, associated mailing lists are deleted. (LP: #837526)
* * You can now query or change a member's `delivery_mode` attribute throughBarry Warsaw2011-09-014-12/+128
|\ | | | | | | the REST API (LP: #833132). Given by Stephen A. Goss.
| * LP 833132: add delivery_mode to member info in REST API, and make PATCHable ↵Stephen A. Goss2011-08-243-10/+129
| | | | | | | | with tests
* | * PATCHing an invalid attribute on a member did not give a 400 errorBarry Warsaw2011-09-012-2/+20
| | | | | | | | (LP: #833376). Given by Stephen A. Goss.
* | * Getting the roster or configuration of a nonexistent list did not give aBarry Warsaw2011-09-012-0/+93
| | | | | | | | 404 error (LP: #837676). Given by Stephen A. Goss.
* | * New REST resource http://.../<domain>/lists can be GETed in order to findBarry Warsaw2011-08-306-4/+158
|\ \ | | | | | | | | | | | | all the mailing lists in a specific domain (LP: #829765). Given by Stephen A. Goss.
| * | merged changes to main branchStephen A. Goss2011-08-232-13/+13
| |\|
| * | some tweaks to fix for LP: 829765 based on feedbackStephen A. Goss2011-08-234-7/+54
| | |
| * | REST API: add listing of mailing lists per domainStephen A. Goss2011-08-194-3/+49
| | |
* | | * User and Member ids are now proper UUIDs. The UUIDs are pended as unicodes,Barry Warsaw2011-08-305-23/+91
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and exposed to the REST API as their integer equivalents. They are stored in the database using Storm's UUID type. - ISubscriptionService.get_member() now takes a UUID - IUserManager.get_user_by_id() now takes a UUID * Moderators and owners can be added via REST (LP: #834130). Given by Stephen A. Goss. - add_member() grows a `role` parameter. - ISubscriptionService.join() grows a `role` parameter. * InvalidEmailAddressError no longer repr()'s its value. * `address` -> `email` for consistency - delete_member() - ISubscriptionService.leave() * Fixed typo in app/subscriptions.py __all__ * AlreadySubscribedError: attributes are now public. * More .txt -> .rst renames.
| * | LP: #834130 add moderators and owners through REST API w/testsStephen A. Goss2011-08-252-3/+23
|/ /
* / Rename IDomain.email_host to .mail_host for consistency. Similarly in theBarry Warsaw2011-08-222-13/+13
|/ | | | REST API. (LP: #831660)
* Basic infrastructure for fixing bug 827036.Barry Warsaw2011-08-172-4/+42
| | | | | | | | | * Use zope.events to signal when a mailing list has been created or deleted. * Register a handler for the ListDeletedEvent which cleans up member subscriptions. * Relax the criteria for find_members(), both internally and in the REST API, so that the subscriber is not required. E.g. you can now find all members of a mailing list.
* * DELETE users via the REST API. (LP: #820660)Barry Warsaw2011-08-143-4/+93
|
* * Fixed incorrect error code for /members/<bogus> (LP: #821020). Given byBarry Warsaw2011-08-142-0/+12
| | | | Stephen A. Goss.
* Remove role plurals from /lists/<fqdn_listname/rosters/<role>Barry Warsaw2011-08-142-10/+19
|
* Fixed broken API for getting a membership via role and email from a mailingBarry Warsaw2011-08-142-4/+21
| | | | | | list. (LP: #825570) Untested code is broken code.
* * New REST resource http://.../members/find can be POSTed to in order to findBarry Warsaw2011-08-134-142/+150
| | | | | | member records. Arguments are `subscriber` (email address to search for - required), `fqdn_listname` (optional), and `role` (i.e. MemberRole - optional). (LP: #799612)
* * The IMailingList attribute ``host_name`` has been renamed to ``mail_host``Barry Warsaw2011-06-164-5/+5
| | | | | 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-259-75/+360
| | | | | | | | | | | | | | 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.
* Allow users to subscribe to mailing lists through the REST API.Barry Warsaw2011-04-244-29/+100
| | | | | | | | * ISubscriptionService.join(): address -> subscriber. This is not backward compatible with the previous API! * Add get_user_by_id() to the IUserManager interface. It was already implemented, but the interface was missing the definition. * MissingUserError: new exception, purely for the REST API.
* Users subscribed to a mailing list via their preferred address show upBarry Warsaw2011-04-221-8/+42
| | | | | correctly in the REST API's list of members. This even correctly tracks changes in their preferred address.
* Give IMembers a unique member id. We have to do this in order to give them aBarry Warsaw2011-04-225-58/+128
| | | | | | | | | | | | | | | | | | | | | | | path at the root of the resource tree (i.e. /members/X) and because when members can be subscribed by their IUser record (for preferred address), their canonical location cannot contain the address they are subscribed with. When their preferred address changes (without otherwise touching their membership), this address will change and that's not good for a canonical location. Other changes: * Added IMember.member_id attribute * Added ISubscriptionService.get_member() so member records can be retrieve by member id. * We can now get individual members by id via the REST API. * Extend the UniqueIDFactory so that it can take a 'context' (defaulting to None). The context is only used in the testing infrastructure so that separate files can be used for user ids and member ids. Otherwise, we'd have gaps in those sequences. * When *not* in testing mode, ensure that UIDs cannot be reused by keeping a table of all UIDs ever handed out. We *should* never get collisions, but this ensures it. * Clean up mailman.sql
* Clean up.Barry Warsaw2011-04-201-6/+0
|
* * Move members.txt corner cases to unittests.Barry Warsaw2011-04-206-80/+175
| | | | | | | * Fix a case in a list's /members API where the listname is bogus. * Catch NotAMemberError form delete_member() and return not_found. * Refactor REST helpers so that call_api() can be used in unittests without doing any prints to stdout.
* Add REST API for addresses, and change the user REST API to use it whereBarry Warsaw2011-04-195-73/+320
| | | | | | | | | | appropriate. Also: * When an Address instance is created, set its registered_on attribute. * Users may not have a password or real_name, so only include those attributes in the REST API for Users if they are set.
* Give user resources and user address resources a self_link.Barry Warsaw2011-04-192-31/+46
|
* Add REST API for removing a domain.Barry Warsaw2011-04-192-1/+32
|
* Add a test for retrieval by case-preserved address.Barry Warsaw2011-04-091-0/+7
|
* Add /users/<uid>/addresses to get all the addresses registered to a user.Barry Warsaw2011-04-092-1/+113
|
* Hook in initial password setting to user creation via API.Barry Warsaw2011-04-082-3/+31
|
* 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.