# 63 Mail recording/unrecording

* adds mail sending in case of unrecording and recording of data
* adds/updates translations
This commit is contained in:
2022-01-12 15:09:52 +01:00
parent eb54443aca
commit d7a9f72c3e
8 changed files with 230 additions and 15 deletions

View File

@@ -25,7 +25,7 @@ class User(AbstractUser):
""" Sends a mail to the user in case of removed shared access
Args:
obj ():
obj_identifier ():
Returns:
@@ -36,10 +36,10 @@ class User(AbstractUser):
mailer.send_mail_shared_access_removed(obj_identifier, self)
def send_mail_shared_access_given(self, obj_identifier):
""" Sends a mail to the user in case of removed shared access
""" Sends a mail to the user in case of given shared access
Args:
obj ():
obj_identifier ():
Returns:
@@ -48,3 +48,31 @@ class User(AbstractUser):
if notification_set:
mailer = Mailer()
mailer.send_mail_shared_access_given(obj_identifier, self)
def send_mail_shared_data_recorded(self, obj_identifier):
""" Sends a mail to the user in case of shared data has been recorded
Args:
obj_identifier ():
Returns:
"""
notification_set = self.is_notification_setting_set(UserNotificationEnum.NOTIFY_ON_SHARED_DATA_RECORDED)
if notification_set:
mailer = Mailer()
mailer.send_mail_shared_data_recorded(obj_identifier, self)
def send_mail_shared_data_unrecorded(self, obj_identifier):
""" Sends a mail to the user in case of shared data has been unrecorded
Args:
obj_identifier ():
Returns:
"""
notification_set = self.is_notification_setting_set(UserNotificationEnum.NOTIFY_ON_SHARED_DATA_RECORDED)
if notification_set:
mailer = Mailer()
mailer.send_mail_shared_data_unrecorded(obj_identifier, self)