~rashi007/mailman/docsfix

« back to all changes in this revision

Viewing changes to src/mailman/rest/addresses.py

  • Committer: Barry Warsaw
  • Date: 2015-02-06 03:53:56 UTC
  • Revision ID: barry@list.org-20150206035356-ufia0ei1rm6qfzkj
 * You can now DELETE an address.  If the address is linked to a user, the
   user is not delete, it is just unlinked.

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
        else:
115
115
            okay(response, self._resource_as_json(self._address))
116
116
 
 
117
    def on_delete(self, request, response):
 
118
        if self._address is None:
 
119
            not_found(response)
 
120
        else:
 
121
            getUtility(IUserManager).delete_address(self._address)
 
122
            no_content(response)
 
123
 
117
124
    @child()
118
125
    def memberships(self, request, segments):
119
126
        """/addresses/<email>/memberships"""