summaryrefslogtreecommitdiff
path: root/service/pixelated
diff options
context:
space:
mode:
authorJefferson Stachelski <jeffhsta@riseup.net>2016-02-12 17:58:45 -0200
committerJefferson Stachelski <jeffhsta@riseup.net>2016-02-12 17:58:45 -0200
commita9626c697992fcd596726a4c16ba8c9757f6a0dd (patch)
tree36461e71dada715b6bd1f59c311271f5a83f68b0 /service/pixelated
parente889bb5c34d4fcfa0f798134771e9dcb3ab062f6 (diff)
attachments are only un-linked from emails but not deleted in soledad
- removed backend delete of attachments - JS unit tests - Functional test Issue #549
Diffstat (limited to 'service/pixelated')
-rw-r--r--service/pixelated/adapter/mailstore/leap_attachment_store.py6
-rw-r--r--service/pixelated/adapter/services/mail_service.py3
-rw-r--r--service/pixelated/resources/attachments_resource.py14
3 files changed, 0 insertions, 23 deletions
diff --git a/service/pixelated/adapter/mailstore/leap_attachment_store.py b/service/pixelated/adapter/mailstore/leap_attachment_store.py
index 2c004abf..982d9222 100644
--- a/service/pixelated/adapter/mailstore/leap_attachment_store.py
+++ b/service/pixelated/adapter/mailstore/leap_attachment_store.py
@@ -63,9 +63,3 @@ class LeapAttachmentStore(object):
def _calc_attachment_id_(self, content, content_type, encoder=encoders.encode_base64):
cdoc = self._attachment_to_cdoc(content, content_type, encoder)
return cdoc.phash
-
- @defer.inlineCallbacks
- def delete_attachment(self, attachment_id):
- doc = yield self.soledad.get_from_index('by-type-and-payloadhash', 'cnt', attachment_id)
- doc = doc[0]
- yield self.soledad.delete_doc(doc)
diff --git a/service/pixelated/adapter/services/mail_service.py b/service/pixelated/adapter/services/mail_service.py
index d2506dcf..dd1a32d8 100644
--- a/service/pixelated/adapter/services/mail_service.py
+++ b/service/pixelated/adapter/services/mail_service.py
@@ -151,6 +151,3 @@ class MailService(object):
@defer.inlineCallbacks
def delete_permanent(self, mail_id):
yield self.mail_store.delete_mail(mail_id)
-
- def delete_attachment(self, attachment_id):
- return self.attachment_store.delete_attachment(attachment_id)
diff --git a/service/pixelated/resources/attachments_resource.py b/service/pixelated/resources/attachments_resource.py
index da455f98..086f6e4e 100644
--- a/service/pixelated/resources/attachments_resource.py
+++ b/service/pixelated/resources/attachments_resource.py
@@ -72,20 +72,6 @@ class AttachmentResource(Resource):
match = re.compile('([A-Za-z-]+\/[A-Za-z-]+)').search(content_type)
return match.group(1)
- def render_DELETE(self, request):
- def success(_):
- response_json = {"ident": self.attachment_id}
- respond_json_deferred(response_json, request, status_code=200)
-
- def failure(err):
- request.code = 500
- request.finish()
-
- d = self.mail_service.delete_attachment(self.attachment_id)
- d.addCallback(success)
- d.addErrback(failure)
- return server.NOT_DONE_YET
-
class AttachmentsResource(BaseResource):
BASE_URL = 'attachment'