# 63 Mail recording/unrecording
* adds mail sending in case of unrecording and recording of data * adds/updates translations
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user