From 1de3792d98d98d1938dd788f1d52cc6e0a70dac5 Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Wed, 12 Jan 2022 15:48:47 +0100 Subject: [PATCH] # 63 Mail data checked * adds mail sending if shared data is checked * adds/updates translations --- konova/models/object.py | 9 +++- konova/tasks.py | 7 +++ konova/utils/mailer.py | 24 ++++++++- locale/de/LC_MESSAGES/django.mo | Bin 33496 -> 33985 bytes locale/de/LC_MESSAGES/django.po | 46 +++++++++++++----- .../email/checking/shared_data_checked.html | 26 ++++++++++ user/models/user.py | 14 ++++++ 7 files changed, 112 insertions(+), 14 deletions(-) create mode 100644 templates/email/checking/shared_data_checked.html diff --git a/konova/models/object.py b/konova/models/object.py index 8353a04d..a27398de 100644 --- a/konova/models/object.py +++ b/konova/models/object.py @@ -12,7 +12,8 @@ from abc import abstractmethod from django.contrib import messages from konova.tasks import celery_send_mail_shared_access_removed, celery_send_mail_shared_access_given, \ - celery_send_mail_shared_data_recorded, celery_send_mail_shared_data_unrecorded, celery_send_mail_shared_data_deleted + celery_send_mail_shared_data_recorded, celery_send_mail_shared_data_unrecorded, \ + celery_send_mail_shared_data_deleted, celery_send_mail_shared_data_checked from user.models import User from django.core.exceptions import ObjectDoesNotExist from django.http import HttpRequest @@ -324,6 +325,12 @@ class CheckableObjectMixin(models.Model): action = UserActionLogEntry.get_checked_action(user) self.checked = action self.save() + + # Send mail + shared_users = self.users.all().values_list("id", flat=True) + for user_id in shared_users: + celery_send_mail_shared_data_checked.delay(self.identifier, user_id) + self.log.add(action) return action diff --git a/konova/tasks.py b/konova/tasks.py index 16925e57..a463374c 100644 --- a/konova/tasks.py +++ b/konova/tasks.py @@ -51,3 +51,10 @@ def celery_send_mail_shared_data_deleted(obj_identifier, user_id): from user.models import User user = User.objects.get(id=user_id) user.send_mail_shared_data_deleted(obj_identifier) + + +@shared_task +def celery_send_mail_shared_data_checked(obj_identifier, user_id): + from user.models import User + user = User.objects.get(id=user_id) + user.send_mail_shared_data_checked(obj_identifier) diff --git a/konova/utils/mailer.py b/konova/utils/mailer.py index b919164d..9c273ff6 100644 --- a/konova/utils/mailer.py +++ b/konova/utils/mailer.py @@ -138,7 +138,7 @@ class Mailer: ) def send_mail_shared_data_deleted(self, obj_identifier, user): - """ Send a mail if user just got access to the object + """ Send a mail if shared data has just been deleted Args: obj_identifier (str): The object identifier @@ -159,3 +159,25 @@ class Mailer: msg ) + def send_mail_shared_data_checked(self, obj_identifier, user): + """ Send a mail if shared data just has been checked + + Args: + obj_identifier (str): The object identifier + + Returns: + + """ + context = { + "user": user, + "obj_identifier": obj_identifier, + "EMAIL_REPLY_TO": EMAIL_REPLY_TO, + } + msg = render_to_string("email/checking/shared_data_checked.html", context) + user_mail_address = [user.email] + self.send( + user_mail_address, + _("{} - Shared data checked").format(obj_identifier), + msg + ) + diff --git a/locale/de/LC_MESSAGES/django.mo b/locale/de/LC_MESSAGES/django.mo index 0549af9432c9a7b11da7a7ef08a875da77274db2..2790b18bdab387bb61f98c9e500c07f48890c5bd 100644 GIT binary patch delta 10093 zcmZA62Xqx>8piQSqa+X_J=6VmL{2rA%OcK83>dE@cy9AAE4nfdz6Mg8lXz!NV9`mU7>UhZ(6 z4RD-FI4In4yn&9hRvE4aQI1oBx`w!nd{QmPnTwY&4+qtDoIZFRGcZ2dak}9qoQ*$W zWqdBiaZ2J!ERNgVywBNBq7VfiVHkdf#qb(V!f%l=IjMDApGDm_1E0hNR=x{MlRt(L z_&Gj-H!c4dOOP)T>o}#bJeGERjuT5l9VB5{Oul&Q<&WwZSDouVOgfLk;YA z)RKoXT|HkFwbzYNxdd?isk#Go*Rzpcp_?L=2`th)C#V^VBFAv_1DZcQ=kzYKn>&!M&M=C*4#pM z^Z+~KFW3}2G<2Mo@OdnOp^e;*E1)`xMYY!yHIWXefe%LwEZt`XnWzqO&6%hrn~!Q> zJ!&BDpdLJcn&EL&$Dg6L@@v%A+(S+1SJaXhZS0nNP;Yi!)E4>mFQFcc zjN=u;I;a^pL_OFHD`FCA4+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Ja>O*yGA@Aj@Y>oTL1D?^dpW^ z*_;RlaT)Eh3h39KNFpjt)c%qCfRZa1VwM(S#r6{6nwZ zN5oz#&nZV8%W)3wA>Jo$67z{?N2py_*(#b*UP%4}(cbEs+BHKd|JUk-zvZXV?Z8F5 zh&vQkU>CdT0OhK7;rmt>L-_>x>qNNK*(J^!Br((#!1_dMVv}7{7I#wC@sOBl^%b6d zfBNK~;*StKMKmKy6MrFeY#_Q4UlTov#l%r!EU}%3WnndYD5+EExx5kOK*~|X-^hy) zACmV*fBpWyM6#ZWRYU+$k8&QN<2cccIvsrpy{`YxFY$LG`OlWmC;x=}Lt-iUV&aCK z`@kGdU7F=$1LbnG?*x++Bc2^^k-TZ;9p*7}Ip_Xi7f!}#%f(Kvxr-g`+NtEH$nRqd z?2fZ=GnOI3h$_qYN5@D`?7&P+%CF&1B>XZrHga-!?%|}{ez|{koavYQPI8n_?(MD{ aqjKMx_Rv2!(5>Z{n>M$t&&rSIJ^nwJ\n" "Language-Team: LANGUAGE \n" @@ -1773,6 +1773,10 @@ msgstr "{} - Freigegebene Daten entzeichnet" msgid "{} - Shared data deleted" msgstr "{} - Freigegebene Daten gelöscht" +#: konova/utils/mailer.py:180 +msgid "{} - Shared data checked" +msgstr "{} - Freigegebene Daten geprüft" + #: konova/utils/message_templates.py:11 msgid "There was an error on this form." msgstr "Es gab einen Fehler im Formular." @@ -1887,10 +1891,11 @@ msgstr "Alle" msgid "News" msgstr "Neuigkeiten" -#: templates/email/deleting/shared_data_deleted.html:4 -msgid "Shared data deleted" -msgstr "Freigegebene Daten gelöscht" +#: templates/email/checking/shared_data_checked.html:4 +msgid "Shared data checked" +msgstr "Freigegebene Daten geprüft" +#: templates/email/checking/shared_data_checked.html:8 #: templates/email/deleting/shared_data_deleted.html:8 #: templates/email/recording/shared_data_recorded.html:8 #: templates/email/recording/shared_data_unrecorded.html:8 @@ -1899,6 +1904,31 @@ msgstr "Freigegebene Daten gelöscht" msgid "Hello " msgstr "Hallo " +#: templates/email/checking/shared_data_checked.html:10 +msgid "the following dataset has just been checked" +msgstr "der folgende Datensatz wurde soeben geprüft " + +#: templates/email/checking/shared_data_checked.html:14 +msgid "" +"This means, the responsible registration office just confirmed the " +"correctness of this dataset." +msgstr "" +"Das bedeutet, dass die zuständige Zulassungsbehörde die Korrektheit des Datensatzes " +"soeben bestätigt hat." + +#: templates/email/checking/shared_data_checked.html:17 +#: templates/email/deleting/shared_data_deleted.html:17 +#: templates/email/recording/shared_data_recorded.html:17 +#: templates/email/recording/shared_data_unrecorded.html:17 +#: templates/email/sharing/shared_access_given.html:18 +#: templates/email/sharing/shared_access_removed.html:18 +msgid "Best regards" +msgstr "Beste Grüße" + +#: templates/email/deleting/shared_data_deleted.html:4 +msgid "Shared data deleted" +msgstr "Freigegebene Daten gelöscht" + #: templates/email/deleting/shared_data_deleted.html:10 msgid "the following dataset has just been deleted" msgstr "der folgende Datensatz wurde soeben gelöscht " @@ -1911,14 +1941,6 @@ msgstr "" "Falls das nicht hätte passieren dürfen, kontaktieren Sie uns bitte. In der E-" "mail Signatur finden Sie weitere Kontaktinformationen." -#: templates/email/deleting/shared_data_deleted.html:17 -#: templates/email/recording/shared_data_recorded.html:17 -#: templates/email/recording/shared_data_unrecorded.html:17 -#: templates/email/sharing/shared_access_given.html:18 -#: templates/email/sharing/shared_access_removed.html:18 -msgid "Best regards" -msgstr "Beste Grüße" - #: templates/email/recording/shared_data_recorded.html:4 msgid "Shared data recorded" msgstr "Freigegebene Daten verzeichnet" diff --git a/templates/email/checking/shared_data_checked.html b/templates/email/checking/shared_data_checked.html new file mode 100644 index 00000000..ccc0bbf3 --- /dev/null +++ b/templates/email/checking/shared_data_checked.html @@ -0,0 +1,26 @@ +{% load i18n %} + +
+

{% trans 'Shared data checked' %}

+

{{obj_identifier}}

+
+
+ {% trans 'Hello ' %} {{user.username}}, +
+ {% trans 'the following dataset has just been checked' %} +
+ '{{obj_identifier}}' +
+ {% trans 'This means, the responsible registration office just confirmed the correctness of this dataset.' %} +
+
+ {% trans 'Best regards' %} +
+ KSP +
+
+
+ {% include 'email/signature.html' %} +
+
+ diff --git a/user/models/user.py b/user/models/user.py index 12f138e7..837f0c6c 100644 --- a/user/models/user.py +++ b/user/models/user.py @@ -90,3 +90,17 @@ class User(AbstractUser): if notification_set: mailer = Mailer() mailer.send_mail_shared_data_deleted(obj_identifier, self) + + def send_mail_shared_data_checked(self, obj_identifier): + """ Sends a mail to the user in case of shared data has been deleted + + Args: + obj_identifier (): + + Returns: + + """ + notification_set = self.is_notification_setting_set(UserNotificationEnum.NOTIFY_ON_SHARED_DATA_CHECKED) + if notification_set: + mailer = Mailer() + mailer.send_mail_shared_data_checked(obj_identifier, self)