'Removes a membership from the image.'

@utils.mutating
def delete(self, req, image_id, id):

    self._check_can_access_image_members(req.context)
    self._enforce(req, 'delete_member')
    self._raise_404_if_image_deleted(req, image_id)
    try:
        registry.delete_member(req.context, image_id, id)
        self._update_store_acls(req, image_id)
    except exception.NotFound as e:
        LOG.debug(encodeutils.exception_to_unicode(e))
        raise webob.exc.HTTPNotFound(explanation=e.msg)
    except exception.Forbidden as e:
        LOG.debug("User    not    permitted    to    remove    membership    from    image    '%s'", image_id)
        raise webob.exc.HTTPNotFound(explanation=e.msg)
    return webob.exc.HTTPNoContent()
