From 6e7bfd50436c702aea5d392adcf2d63340ed3f69 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Wed, 17 Aug 2011 19:10:39 -0400 Subject: Basic infrastructure for fixing bug 827036. * 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. --- src/mailman/rest/docs/membership.rst | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'src/mailman/rest/docs') diff --git a/src/mailman/rest/docs/membership.rst b/src/mailman/rest/docs/membership.rst index 426b80acf..bed4f425d 100644 --- a/src/mailman/rest/docs/membership.rst +++ b/src/mailman/rest/docs/membership.rst @@ -308,6 +308,43 @@ example, we can search for all the memberships of a particular address. start: 0 total_size: 2 +Or, we can find all the memberships for a particular mailing list. + + >>> dump_json('http://localhost:9001/3.0/members/find', { + ... 'fqdn_listname': 'bee@example.com', + ... }) + entry 0: + address: aperson@example.com + fqdn_listname: bee@example.com + http_etag: ... + role: member + self_link: http://localhost:9001/3.0/members/3 + user: http://localhost:9001/3.0/users/3 + entry 1: + address: bperson@example.com + fqdn_listname: bee@example.com + http_etag: ... + role: member + self_link: http://localhost:9001/3.0/members/1 + user: http://localhost:9001/3.0/users/1 + entry 2: + address: cperson@example.com + fqdn_listname: bee@example.com + http_etag: ... + role: member + self_link: http://localhost:9001/3.0/members/2 + user: http://localhost:9001/3.0/users/2 + entry 3: + address: cperson@example.com + fqdn_listname: bee@example.com + http_etag: ... + role: owner + self_link: http://localhost:9001/3.0/members/7 + user: http://localhost:9001/3.0/users/2 + http_etag: "66836d0f23bed36fa9e0cda1e5dec7e5b0797743" + start: 0 + total_size: 4 + Or, we can find all the memberships for an address on a particular mailing list. -- cgit v1.3.1