From dff44b1ca5252600eb07759a9c16f60253c1c421 Mon Sep 17 00:00:00 2001
From: Fredrik Jonsson <frjo@xdeb.org>
Date: Fri, 10 Jan 2020 14:12:23 +0100
Subject: [PATCH] Remove sensitive information from determination and comments
 e-mails.

---
 .../activity/templates/messages/email/applicant_base.html | 3 ++-
 .../apply/activity/templates/messages/email/comment.html  | 8 ++++++--
 .../activity/templates/messages/email/determination.html  | 7 +------
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/opentech/apply/activity/templates/messages/email/applicant_base.html b/opentech/apply/activity/templates/messages/email/applicant_base.html
index 6ddf443bc..a7d8ca9fc 100644
--- a/opentech/apply/activity/templates/messages/email/applicant_base.html
+++ b/opentech/apply/activity/templates/messages/email/applicant_base.html
@@ -1,7 +1,8 @@
 {% extends "messages/email/base.html" %}
 {% block salutation %}Dear {{ source.user.get_full_name|default:"applicant" }},{% endblock %}
 
-{% block more_info %}You can find more information here: {{ request.scheme }}://{{ request.get_host }}{{ source.get_absolute_url }}
+{% block more_info %}
+You can find more information here: {{ request.scheme }}://{{ request.get_host }}{{ source.get_absolute_url }}
 If you have any questions, please submit them here: {{ request.scheme }}://{{ request.get_host }}{{ source.get_absolute_url }}#communications
 
 If you have any issues accessing the submission system or other general inquiries, please email us at {{ ORG_EMAIL }}
diff --git a/opentech/apply/activity/templates/messages/email/comment.html b/opentech/apply/activity/templates/messages/email/comment.html
index e89ca785f..3f79b43bd 100644
--- a/opentech/apply/activity/templates/messages/email/comment.html
+++ b/opentech/apply/activity/templates/messages/email/comment.html
@@ -1,5 +1,9 @@
 {% extends "messages/email/applicant_base.html" %}
 
-{% block content %}There has been a new comment on "{{ source.title }}"
+{% block content %}There has been a new comment on "{{ source.title }}" by {{ comment.user }}.
 
-{{ comment.user }}: {{ comment.message }}{% endblock %}
+Read the full comment here: {{ request.scheme }}://{{ request.get_host }}{{ source.get_absolute_url }}#communications{% endblock %}
+
+{% block more_info %}
+If you have any issues accessing the submission system or other general inquiries, please email us at {{ ORG_EMAIL }}
+{% endblock %}
diff --git a/opentech/apply/activity/templates/messages/email/determination.html b/opentech/apply/activity/templates/messages/email/determination.html
index da042f16b..1e540314c 100644
--- a/opentech/apply/activity/templates/messages/email/determination.html
+++ b/opentech/apply/activity/templates/messages/email/determination.html
@@ -7,9 +7,4 @@
 
 {{ determination.message|bleach|striptags }}
 
-{% for group in determination.detailed_data.values %}{{ group.title }}
-{% for question, answer in group.questions %}
-{% if answer %}{{ question }}:
-{{ answer|bleach|striptags }}{% endif %}{% endfor %}{% endfor %}
-
-Read the determination here: {{ request.scheme }}://{{ request.get_host }}{{ determination.get_absolute_url }}{% endblock %}
+Read the full determination here: {{ request.scheme }}://{{ request.get_host }}{{ determination.get_absolute_url }}{% endblock %}
-- 
GitLab