From 44a792583c78f2d2f008caa4e3770ea326581aee Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Thu, 10 May 2018 10:00:52 +0200 Subject: [PATCH] Specifically warn about some shredders --- src/pretix/base/shredder.py | 10 ++++++++++ .../templates/pretixcontrol/shredder/index.html | 12 +++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/pretix/base/shredder.py b/src/pretix/base/shredder.py index 62387a91a1..d588fc1af0 100644 --- a/src/pretix/base/shredder.py +++ b/src/pretix/base/shredder.py @@ -74,6 +74,13 @@ class BaseDataShredder: """ raise NotImplementedError() # NOQA + @property + def tax_relevant(self): + """ + Indicates whether this removes potentially tax-relevant data. + """ + return False + @property def verbose_name(self) -> str: """ @@ -216,6 +223,7 @@ class AttendeeNameShredder(BaseDataShredder): class InvoiceAddressShredder(BaseDataShredder): verbose_name = _('Invoice addresses') identifier = 'invoice_addresses' + tax_relevant = True description = _('This will remove all invoice addresses from orders, as well as logged changes to them.') def generate_files(self) -> List[Tuple[str, str, str]]: @@ -269,6 +277,7 @@ class QuestionAnswerShredder(BaseDataShredder): class InvoiceShredder(BaseDataShredder): verbose_name = _('Invoices') identifier = 'invoices' + tax_relevant = True description = _('This will remove all invoice PDFs, as well as any of their text content that might contain ' 'personal data from the database. Invoice numbers and totals will be conserved.') @@ -312,6 +321,7 @@ class CachedTicketShredder(BaseDataShredder): class PaymentInfoShredder(BaseDataShredder): verbose_name = _('Payment information') identifier = 'payment_info' + tax_relevant = True description = _('This will remove payment-related information. Depending on the payment method, all data will be ' 'removed or personal data only. No download will be offered.') diff --git a/src/pretix/control/templates/pretixcontrol/shredder/index.html b/src/pretix/control/templates/pretixcontrol/shredder/index.html index 0cf94ab3ea..90c32550ed 100644 --- a/src/pretix/control/templates/pretixcontrol/shredder/index.html +++ b/src/pretix/control/templates/pretixcontrol/shredder/index.html @@ -25,7 +25,8 @@ {% blocktrans trimmed %} It is within your own responsibility to check if you are allowed to delete the affected data in your - legislation, e.g. for reasons of taxation. + legislation, e.g. for reasons of taxation. In many countries, you need to keep some data in the live + system in case of an audit. {% endblocktrans %} {% blocktrans trimmed %} @@ -57,6 +58,15 @@
+ {% if shredder.tax_relevant %} + + {% endif %} {{ shredder.description|safe }}