diff options
| author | Barry Warsaw | 2010-07-06 22:58:27 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2010-07-06 22:58:27 -0400 |
| commit | 5896e00cc2fe7c04254e6f3005648039d42408e8 (patch) | |
| tree | 0487d4f7c15400069a96c95d762f7aa4cf91d8e4 /src/mailman/rest/lists.py | |
| parent | db19156330bf6bbca9a6e13c5d85676e43be3b29 (diff) | |
| parent | 8f8ce7616cc8e6149b27fbcb8e581fc35c814c87 (diff) | |
| download | mailman-5896e00cc2fe7c04254e6f3005648039d42408e8.tar.gz mailman-5896e00cc2fe7c04254e6f3005648039d42408e8.tar.zst mailman-5896e00cc2fe7c04254e6f3005648039d42408e8.zip | |
Diffstat (limited to 'src/mailman/rest/lists.py')
| -rw-r--r-- | src/mailman/rest/lists.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/mailman/rest/lists.py b/src/mailman/rest/lists.py index 5d7ed0c86..ddda613c9 100644 --- a/src/mailman/rest/lists.py +++ b/src/mailman/rest/lists.py @@ -29,13 +29,13 @@ __all__ = [ from restish import http, resource from zope.component import getUtility -from mailman.app.lifecycle import create_list +from mailman.app.lifecycle import create_list, remove_list from mailman.interfaces.domain import BadDomainSpecificationError from mailman.interfaces.listmanager import ( IListManager, ListAlreadyExistsError) from mailman.interfaces.member import MemberRole from mailman.rest.helpers import ( - CollectionMixin, Validator, etag, path_to, restish_matcher) + CollectionMixin, Validator, etag, no_content, path_to, restish_matcher) from mailman.rest.members import AMember, MembersOfList @@ -112,6 +112,17 @@ class AList(_ListBase): return http.not_found() return http.ok([], self._resource_as_json(self._mlist)) + @resource.DELETE() + def delete_list(self, request): + """Delete the named mailing list.""" + if self._mlist is None: + return http.not_found() + remove_list(self._mlist.fqdn_listname, self._mlist, + # XXX 2010-07-06 barry we need a way to remove the list + # archives either with the mailing list or afterward. + archives=False) + return no_content() + @resource.child(member_matcher) def member(self, request, segments, role, address): """Return a single member representation.""" |
