From a726115c91e20c2a792111e24fe7c3f1c6ac6685 Mon Sep 17 00:00:00 2001 From: kiblik <5609770+kiblik@users.noreply.github.com> Date: Fri, 20 Sep 2024 15:27:51 +0200 Subject: [PATCH] fix existing --- ..._notif.py => 0216_system_settings_disclaimer_notif.py} | 2 +- dojo/fixtures/defect_dojo_sample_data.json | 2 +- dojo/forms.py | 7 +++++++ dojo/reports/views.py | 8 ++++---- dojo/templates/notifications/alert/review_requested.tpl | 4 ++-- dojo/templates/notifications/mail/engagement_added.tpl | 4 ++-- dojo/templates/notifications/mail/other.tpl | 4 ++-- dojo/templates/notifications/mail/product_added.tpl | 4 ++-- dojo/templates/notifications/mail/product_type_added.tpl | 4 ++-- dojo/templates/notifications/mail/report_created.tpl | 4 ++-- dojo/templates/notifications/mail/review_requested.tpl | 4 ++-- .../notifications/mail/risk_acceptance_expiration.tpl | 4 ++-- dojo/templates/notifications/mail/scan_added.tpl | 4 ++-- dojo/templates/notifications/mail/sla_breach.tpl | 4 ++-- dojo/templates/notifications/mail/sla_breach_combined.tpl | 4 ++-- dojo/templates/notifications/mail/test_added.tpl | 4 ++-- dojo/templates/notifications/mail/upcoming_engagement.tpl | 4 ++-- dojo/templates/notifications/mail/user_mentioned.tpl | 4 ++-- dojo/templates/notifications/msteams/engagement_added.tpl | 4 ++-- dojo/templates/notifications/msteams/other.tpl | 4 ++-- dojo/templates/notifications/msteams/product_added.tpl | 4 ++-- .../notifications/msteams/product_type_added.tpl | 4 ++-- dojo/templates/notifications/msteams/report_created.tpl | 4 ++-- dojo/templates/notifications/msteams/review_requested.tpl | 4 ++-- .../notifications/msteams/risk_acceptance_expiration.tpl | 4 ++-- dojo/templates/notifications/msteams/scan_added.tpl | 4 ++-- dojo/templates/notifications/msteams/sla_breach.tpl | 4 ++-- dojo/templates/notifications/msteams/test_added.tpl | 4 ++-- .../notifications/msteams/upcoming_engagement.tpl | 4 ++-- dojo/templates/notifications/msteams/user_mentioned.tpl | 4 ++-- dojo/templates/notifications/slack/engagement_added.tpl | 4 ++-- dojo/templates/notifications/slack/other.tpl | 4 ++-- dojo/templates/notifications/slack/product_added.tpl | 4 ++-- dojo/templates/notifications/slack/product_type_added.tpl | 4 ++-- dojo/templates/notifications/slack/report_created.tpl | 4 ++-- dojo/templates/notifications/slack/review_requested.tpl | 4 ++-- .../notifications/slack/risk_acceptance_expiration.tpl | 4 ++-- dojo/templates/notifications/slack/scan_added.tpl | 4 ++-- dojo/templates/notifications/slack/sla_breach.tpl | 4 ++-- dojo/templates/notifications/slack/test_added.tpl | 4 ++-- .../templates/notifications/slack/upcoming_engagement.tpl | 4 ++-- dojo/templates/notifications/slack/user_mentioned.tpl | 4 ++-- .../notifications/webhooks/subtemplates/base.tpl | 4 ++-- 43 files changed, 91 insertions(+), 84 deletions(-) rename dojo/db_migrations/{0215_system_settings_disclaimer_notif.py => 0216_system_settings_disclaimer_notif.py} (96%) diff --git a/dojo/db_migrations/0215_system_settings_disclaimer_notif.py b/dojo/db_migrations/0216_system_settings_disclaimer_notif.py similarity index 96% rename from dojo/db_migrations/0215_system_settings_disclaimer_notif.py rename to dojo/db_migrations/0216_system_settings_disclaimer_notif.py index ed774c3274..35dc31d13a 100644 --- a/dojo/db_migrations/0215_system_settings_disclaimer_notif.py +++ b/dojo/db_migrations/0216_system_settings_disclaimer_notif.py @@ -6,7 +6,7 @@ class Migration(migrations.Migration): dependencies = [ - ('dojo', '0214_test_type_dynamically_generated'), + ('dojo', '0215_webhooks_notifications'), ] operations = [ diff --git a/dojo/fixtures/defect_dojo_sample_data.json b/dojo/fixtures/defect_dojo_sample_data.json index 2d0ece6cb1..a0c5414058 100644 --- a/dojo/fixtures/defect_dojo_sample_data.json +++ b/dojo/fixtures/defect_dojo_sample_data.json @@ -7119,7 +7119,7 @@ "enable_finding_sla": true, "allow_anonymous_survey_repsonse": false, "credentials": "", - "disclaimer": "", + "disclaimer_notifications": "", "risk_acceptance_form_default_days": 180, "risk_acceptance_notify_before_expiration": 10, "enable_credentials": true, diff --git a/dojo/forms.py b/dojo/forms.py index e22a267d1d..031c70a6c9 100644 --- a/dojo/forms.py +++ b/dojo/forms.py @@ -2288,6 +2288,13 @@ class ReportOptionsForm(forms.Form): include_disclaimer = forms.ChoiceField(choices=yes_no, label="Disclaimer") report_type = forms.ChoiceField(choices=(("HTML", "HTML"),)) + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + if get_system_setting("disclaimer_reports_forced"): + self.fields["include_disclaimer"].disabled = True + self.fields["include_disclaimer"].initial = "1" # represents yes + self.fields["include_disclaimer"].help_text="Administrator of the system enforced placement of disclaimer in all reports. You are not able exclude disclaimer from this report." + class CustomReportOptionsForm(forms.Form): yes_no = (("0", "No"), ("1", "Yes")) diff --git a/dojo/reports/views.py b/dojo/reports/views.py index b9505ada87..e0da6f1162 100644 --- a/dojo/reports/views.py +++ b/dojo/reports/views.py @@ -277,8 +277,8 @@ def product_endpoint_report(request, pid): include_finding_images = int(request.GET.get("include_finding_images", 0)) include_executive_summary = int(request.GET.get("include_executive_summary", 0)) include_table_of_contents = int(request.GET.get("include_table_of_contents", 0)) - include_disclaimer = int(request.GET.get("include_disclaimer", 0)) - disclaimer = get_system_setting("disclaimer") + include_disclaimer = int(request.GET.get("include_disclaimer", 0)) or (get_system_setting("disclaimer_reports_forced", 0)) + disclaimer = get_system_setting("disclaimer_reports") if include_disclaimer and len(disclaimer) == 0: disclaimer = "Please configure in System Settings." generate = "_generate" in request.GET @@ -355,8 +355,8 @@ def generate_report(request, obj, host_view=False): include_finding_images = int(request.GET.get("include_finding_images", 0)) include_executive_summary = int(request.GET.get("include_executive_summary", 0)) include_table_of_contents = int(request.GET.get("include_table_of_contents", 0)) - include_disclaimer = int(request.GET.get("include_disclaimer", 0)) - disclaimer = get_system_setting("disclaimer") + include_disclaimer = int(request.GET.get("include_disclaimer", 0)) or (get_system_setting("disclaimer_reports_forced", 0)) + disclaimer = get_system_setting("disclaimer_reports") if include_disclaimer and len(disclaimer) == 0: disclaimer = "Please configure in System Settings." diff --git a/dojo/templates/notifications/alert/review_requested.tpl b/dojo/templates/notifications/alert/review_requested.tpl index 6d4ee62e63..486e1ce6fe 100644 --- a/dojo/templates/notifications/alert/review_requested.tpl +++ b/dojo/templates/notifications/alert/review_requested.tpl @@ -14,7 +14,7 @@ {% trans "Full details of the finding can be reviewed at" %} {{ url|full_url }} -{% if system_settings.disclaimer and system_settings.disclaimer.strip %} +{% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %} {% trans "Disclaimer:" %} - {{ system_settings.disclaimer }} + {{ system_settings.disclaimer_notifications }} {% endif %} \ No newline at end of file diff --git a/dojo/templates/notifications/mail/engagement_added.tpl b/dojo/templates/notifications/mail/engagement_added.tpl index 4769979ba1..681adc36cc 100644 --- a/dojo/templates/notifications/mail/engagement_added.tpl +++ b/dojo/templates/notifications/mail/engagement_added.tpl @@ -29,11 +29,11 @@ {% url 'notifications' as notification_url %} {% trans "You can manage your notification settings here" %}: {{ notification_url|full_url }}

- {% if system_settings.disclaimer and system_settings.disclaimer.strip %} + {% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %}
{% trans "Disclaimer" %}
-

{{ system_settings.disclaimer }}

+

{{ system_settings.disclaimer_notifications }}

{% endif %} {% endautoescape %} diff --git a/dojo/templates/notifications/mail/other.tpl b/dojo/templates/notifications/mail/other.tpl index 69c96362d2..65e5d854c3 100644 --- a/dojo/templates/notifications/mail/other.tpl +++ b/dojo/templates/notifications/mail/other.tpl @@ -31,11 +31,11 @@ {% url 'notifications' as notification_url %} {% trans "You can manage your notification settings here" %}: {{ notification_url|full_url }}

- {% if system_settings.disclaimer and system_settings.disclaimer.strip %} + {% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %}
{% trans "Disclaimer" %}
-

{{ system_settings.disclaimer }}

+

{{ system_settings.disclaimer_notifications }}

{% endif %} {% endautoescape %} diff --git a/dojo/templates/notifications/mail/product_added.tpl b/dojo/templates/notifications/mail/product_added.tpl index ef8fa7faa6..9e5ecded41 100644 --- a/dojo/templates/notifications/mail/product_added.tpl +++ b/dojo/templates/notifications/mail/product_added.tpl @@ -28,11 +28,11 @@ {% url 'notifications' as notification_url %} {% trans "You can manage your notification settings here" %}: {{ notification_url|full_url }}

- {% if system_settings.disclaimer and system_settings.disclaimer.strip %} + {% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %}
{% trans "Disclaimer" %}
-

{{ system_settings.disclaimer }}

+

{{ system_settings.disclaimer_notifications }}

{% endif %} {% endautoescape %} diff --git a/dojo/templates/notifications/mail/product_type_added.tpl b/dojo/templates/notifications/mail/product_type_added.tpl index 72d7972f56..a229882a34 100644 --- a/dojo/templates/notifications/mail/product_type_added.tpl +++ b/dojo/templates/notifications/mail/product_type_added.tpl @@ -28,11 +28,11 @@ {% url 'notifications' as notification_url %} {% trans "You can manage your notification settings here" %}: {{ notification_url|full_url }}

- {% if system_settings.disclaimer and system_settings.disclaimer.strip %} + {% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %}
{% trans "Disclaimer" %}
-

{{ system_settings.disclaimer }}

+

{{ system_settings.disclaimer_notifications }}

{% endif %} {% endautoescape %} diff --git a/dojo/templates/notifications/mail/report_created.tpl b/dojo/templates/notifications/mail/report_created.tpl index efbb4b8fd6..0c898d276e 100644 --- a/dojo/templates/notifications/mail/report_created.tpl +++ b/dojo/templates/notifications/mail/report_created.tpl @@ -25,11 +25,11 @@ {% trans "You can manage your notification settings here" %}: {{ notification_url|full_url }}

- {% if system_settings.disclaimer and system_settings.disclaimer.strip %} + {% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %}
{% trans "Disclaimer" %}
-

{{ system_settings.disclaimer }}

+

{{ system_settings.disclaimer_notifications }}

{% endif %} {% endautoescape %} diff --git a/dojo/templates/notifications/mail/review_requested.tpl b/dojo/templates/notifications/mail/review_requested.tpl index 98bde4113a..c3ef81b1a1 100644 --- a/dojo/templates/notifications/mail/review_requested.tpl +++ b/dojo/templates/notifications/mail/review_requested.tpl @@ -33,11 +33,11 @@ {% url 'notifications' as notification_url %} {% trans "You can manage your notification settings here" %}: {{ notification_url|full_url }}

- {% if system_settings.disclaimer and system_settings.disclaimer.strip %} + {% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %}
{% trans "Disclaimer" %}
-

{{ system_settings.disclaimer }}

+

{{ system_settings.disclaimer_notifications }}

{% endif %} {% endautoescape %} diff --git a/dojo/templates/notifications/mail/risk_acceptance_expiration.tpl b/dojo/templates/notifications/mail/risk_acceptance_expiration.tpl index 7fc4916d1d..ce76a2d1b5 100644 --- a/dojo/templates/notifications/mail/risk_acceptance_expiration.tpl +++ b/dojo/templates/notifications/mail/risk_acceptance_expiration.tpl @@ -52,11 +52,11 @@ {% url 'notifications' as notification_url %} {% trans "You can manage your notification settings here" %}: {{ notification_url|full_url }}

- {% if system_settings.disclaimer and system_settings.disclaimer.strip %} + {% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %}
{% trans "Disclaimer" %}
-

{{ system_settings.disclaimer }}

+

{{ system_settings.disclaimer_notifications }}

{% endif %} {% endautoescape %} diff --git a/dojo/templates/notifications/mail/scan_added.tpl b/dojo/templates/notifications/mail/scan_added.tpl index 513b24818d..263585246e 100644 --- a/dojo/templates/notifications/mail/scan_added.tpl +++ b/dojo/templates/notifications/mail/scan_added.tpl @@ -72,11 +72,11 @@ {% url 'notifications' as notification_url %} {% trans "You can manage your notification settings here" %}: {{ notification_url|full_url }}

- {% if system_settings.disclaimer and system_settings.disclaimer.strip %} + {% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %}
{% trans "Disclaimer" %}
-

{{ system_settings.disclaimer }}

+

{{ system_settings.disclaimer_notifications }}

{% endif %} {% endautoescape %} diff --git a/dojo/templates/notifications/mail/sla_breach.tpl b/dojo/templates/notifications/mail/sla_breach.tpl index 692df2ef2e..97c08762ba 100644 --- a/dojo/templates/notifications/mail/sla_breach.tpl +++ b/dojo/templates/notifications/mail/sla_breach.tpl @@ -45,11 +45,11 @@ {% url 'notifications' as notification_url %} {% trans "You can manage your notification settings here" %}: {{ notification_url|full_url }}

- {% if system_settings.disclaimer and system_settings.disclaimer.strip %} + {% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %}
{% trans "Disclaimer" %}
-

{{ system_settings.disclaimer }}

+

{{ system_settings.disclaimer_notifications }}

{% endif %} {% endautoescape %} diff --git a/dojo/templates/notifications/mail/sla_breach_combined.tpl b/dojo/templates/notifications/mail/sla_breach_combined.tpl index 5b88a656e2..4fc8c8f801 100644 --- a/dojo/templates/notifications/mail/sla_breach_combined.tpl +++ b/dojo/templates/notifications/mail/sla_breach_combined.tpl @@ -55,7 +55,7 @@ {% url 'notifications' as notification_url %} {% trans "You can manage your notification settings here" %}: {{ notification_url|full_url }}

- {% if system_settings.disclaimer and system_settings.disclaimer.strip %} + {% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %}
{{ system_settings.disclaimer }}

+ font-family: 'Cambria','times roman',serif">{{ system_settings.disclaimer_notifications }}

{% endif %} {% endautoescape %} diff --git a/dojo/templates/notifications/mail/test_added.tpl b/dojo/templates/notifications/mail/test_added.tpl index 285bb28faf..3c235ea076 100644 --- a/dojo/templates/notifications/mail/test_added.tpl +++ b/dojo/templates/notifications/mail/test_added.tpl @@ -30,11 +30,11 @@ {% url 'notifications' as notification_url %} {% trans "You can manage your notification settings here" %}: {{ notification_url|full_url }}

- {% if system_settings.disclaimer and system_settings.disclaimer.strip %} + {% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %}
{% trans "Disclaimer" %}
-

{{ system_settings.disclaimer }}

+

{{ system_settings.disclaimer_notifications }}

{% endif %} {% endautoescape %} diff --git a/dojo/templates/notifications/mail/upcoming_engagement.tpl b/dojo/templates/notifications/mail/upcoming_engagement.tpl index ae6da9da7b..858314449c 100644 --- a/dojo/templates/notifications/mail/upcoming_engagement.tpl +++ b/dojo/templates/notifications/mail/upcoming_engagement.tpl @@ -28,11 +28,11 @@ {% url 'notifications' as notification_url %} {% trans "You can manage your notification settings here" %}: {{ notification_url|full_url }}

- {% if system_settings.disclaimer and system_settings.disclaimer.strip %} + {% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %}
{% trans "Disclaimer" %}
-

{{ system_settings.disclaimer }}

+

{{ system_settings.disclaimer_notifications }}

{% endif %} {% endautoescape %} diff --git a/dojo/templates/notifications/mail/user_mentioned.tpl b/dojo/templates/notifications/mail/user_mentioned.tpl index 651fd9df49..9601da3c9a 100644 --- a/dojo/templates/notifications/mail/user_mentioned.tpl +++ b/dojo/templates/notifications/mail/user_mentioned.tpl @@ -31,11 +31,11 @@ {% url 'notifications' as notification_url %} {% trans "You can manage your notification settings here" %}: {{ notification_url|full_url }}

- {% if system_settings.disclaimer and system_settings.disclaimer.strip %} + {% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %}
{% trans "Disclaimer" %}
-

{{ system_settings.disclaimer }}

+

{{ system_settings.disclaimer_notifications }}

{% endif %} {% endautoescape %} diff --git a/dojo/templates/notifications/msteams/engagement_added.tpl b/dojo/templates/notifications/msteams/engagement_added.tpl index 9d7c7ef5b3..747f891107 100644 --- a/dojo/templates/notifications/msteams/engagement_added.tpl +++ b/dojo/templates/notifications/msteams/engagement_added.tpl @@ -21,10 +21,10 @@ } ] } - {% if system_settings.disclaimer and system_settings.disclaimer.strip %} + {% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %} ,{ "activityTitle": "{% trans "Disclaimer" %}", - "text": "{{ system_settings.disclaimer }}" + "text": "{{ system_settings.disclaimer_notifications }}" } {% endif %} diff --git a/dojo/templates/notifications/msteams/other.tpl b/dojo/templates/notifications/msteams/other.tpl index ef0cbe4bd9..123390f9c5 100644 --- a/dojo/templates/notifications/msteams/other.tpl +++ b/dojo/templates/notifications/msteams/other.tpl @@ -11,10 +11,10 @@ "activityImage": "https://raw.githubusercontent.com/DefectDojo/django-DefectDojo/master/dojo/static/dojo/img/chop.png", "text": "{% autoescape on %} {{ description }} {% endautoescape %}" } - {% if system_settings.disclaimer and system_settings.disclaimer.strip %} + {% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %} ,{ "activityTitle": "{% trans "Disclaimer" %}", - "text": "{{ system_settings.disclaimer }}" + "text": "{{ system_settings.disclaimer_notifications }}" } {% endif %} ], diff --git a/dojo/templates/notifications/msteams/product_added.tpl b/dojo/templates/notifications/msteams/product_added.tpl index 31e5a71bf9..d2def33cd0 100644 --- a/dojo/templates/notifications/msteams/product_added.tpl +++ b/dojo/templates/notifications/msteams/product_added.tpl @@ -17,10 +17,10 @@ } ] } - {% if system_settings.disclaimer and system_settings.disclaimer.strip %} + {% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %} ,{ "activityTitle": "{% trans "Disclaimer" %}", - "text": "{{ system_settings.disclaimer }}" + "text": "{{ system_settings.disclaimer_notifications }}" } {% endif %} ], diff --git a/dojo/templates/notifications/msteams/product_type_added.tpl b/dojo/templates/notifications/msteams/product_type_added.tpl index 926ade5a2c..b650f23d6c 100644 --- a/dojo/templates/notifications/msteams/product_type_added.tpl +++ b/dojo/templates/notifications/msteams/product_type_added.tpl @@ -17,10 +17,10 @@ } ] } - {% if system_settings.disclaimer and system_settings.disclaimer.strip %} + {% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %} ,{ "activityTitle": "{% trans "Disclaimer" %}", - "text": "{{ system_settings.disclaimer }}" + "text": "{{ system_settings.disclaimer_notifications }}" } {% endif %} ], diff --git a/dojo/templates/notifications/msteams/report_created.tpl b/dojo/templates/notifications/msteams/report_created.tpl index 8a9b246ebf..42f8398ed2 100644 --- a/dojo/templates/notifications/msteams/report_created.tpl +++ b/dojo/templates/notifications/msteams/report_created.tpl @@ -17,10 +17,10 @@ } ] } - {% if system_settings.disclaimer and system_settings.disclaimer.strip %} + {% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %} ,{ "activityTitle": "{% trans "Disclaimer" %}", - "text": "{{ system_settings.disclaimer }}" + "text": "{{ system_settings.disclaimer_notifications }}" } {% endif %} ], diff --git a/dojo/templates/notifications/msteams/review_requested.tpl b/dojo/templates/notifications/msteams/review_requested.tpl index d1a38c49b0..1ec637c900 100644 --- a/dojo/templates/notifications/msteams/review_requested.tpl +++ b/dojo/templates/notifications/msteams/review_requested.tpl @@ -29,10 +29,10 @@ } ] } - {% if system_settings.disclaimer and system_settings.disclaimer.strip %} + {% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %} ,{ "activityTitle": "{% trans "Disclaimer" %}", - "text": "{{ system_settings.disclaimer }}" + "text": "{{ system_settings.disclaimer_notifications }}" } {% endif %} ], diff --git a/dojo/templates/notifications/msteams/risk_acceptance_expiration.tpl b/dojo/templates/notifications/msteams/risk_acceptance_expiration.tpl index babf9376e8..95e6279b5f 100644 --- a/dojo/templates/notifications/msteams/risk_acceptance_expiration.tpl +++ b/dojo/templates/notifications/msteams/risk_acceptance_expiration.tpl @@ -35,10 +35,10 @@ } ] } - {% if system_settings.disclaimer and system_settings.disclaimer.strip %} + {% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %} ,{ "activityTitle": "{% trans "Disclaimer" %}", - "text": "{{ system_settings.disclaimer }}" + "text": "{{ system_settings.disclaimer_notifications }}" } {% endif %} ], diff --git a/dojo/templates/notifications/msteams/scan_added.tpl b/dojo/templates/notifications/msteams/scan_added.tpl index af32887e9a..52a67fd76c 100644 --- a/dojo/templates/notifications/msteams/scan_added.tpl +++ b/dojo/templates/notifications/msteams/scan_added.tpl @@ -26,10 +26,10 @@ } ] } - {% if system_settings.disclaimer and system_settings.disclaimer.strip %} + {% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %} ,{ "activityTitle": "{% trans "Disclaimer" %}", - "text": "{{ system_settings.disclaimer }}" + "text": "{{ system_settings.disclaimer_notifications }}" } {% endif %} ], diff --git a/dojo/templates/notifications/msteams/sla_breach.tpl b/dojo/templates/notifications/msteams/sla_breach.tpl index c74b7abea2..31ad6991bf 100644 --- a/dojo/templates/notifications/msteams/sla_breach.tpl +++ b/dojo/templates/notifications/msteams/sla_breach.tpl @@ -34,10 +34,10 @@ } ] } - {% if system_settings.disclaimer and system_settings.disclaimer.strip %} + {% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %} ,{ "activityTitle": "{% trans "Disclaimer" %}", - "text": "{{ system_settings.disclaimer }}" + "text": "{{ system_settings.disclaimer_notifications }}" } {% endif %} ], diff --git a/dojo/templates/notifications/msteams/test_added.tpl b/dojo/templates/notifications/msteams/test_added.tpl index 8d5515138e..7b22e5d131 100644 --- a/dojo/templates/notifications/msteams/test_added.tpl +++ b/dojo/templates/notifications/msteams/test_added.tpl @@ -26,10 +26,10 @@ } ] } - {% if system_settings.disclaimer and system_settings.disclaimer.strip %} + {% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %} ,{ "activityTitle": "{% trans "Disclaimer" %}", - "text": "{{ system_settings.disclaimer }}" + "text": "{{ system_settings.disclaimer_notifications }}" } {% endif %} ], diff --git a/dojo/templates/notifications/msteams/upcoming_engagement.tpl b/dojo/templates/notifications/msteams/upcoming_engagement.tpl index 06cbbb2e1c..9cb22d025d 100644 --- a/dojo/templates/notifications/msteams/upcoming_engagement.tpl +++ b/dojo/templates/notifications/msteams/upcoming_engagement.tpl @@ -30,10 +30,10 @@ } ] } - {% if system_settings.disclaimer and system_settings.disclaimer.strip %} + {% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %} ,{ "activityTitle": "{% trans "Disclaimer" %}", - "text": "{{ system_settings.disclaimer }}" + "text": "{{ system_settings.disclaimer_notifications }}" } {% endif %} ], diff --git a/dojo/templates/notifications/msteams/user_mentioned.tpl b/dojo/templates/notifications/msteams/user_mentioned.tpl index 5c09d1c789..fb27ea5ad1 100644 --- a/dojo/templates/notifications/msteams/user_mentioned.tpl +++ b/dojo/templates/notifications/msteams/user_mentioned.tpl @@ -25,10 +25,10 @@ } ] } - {% if system_settings.disclaimer and system_settings.disclaimer.strip %} + {% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %} ,{ "activityTitle": "{% trans "Disclaimer" %}", - "text": "{{ system_settings.disclaimer }}" + "text": "{{ system_settings.disclaimer_notifications }}" } {% endif %} ], diff --git a/dojo/templates/notifications/slack/engagement_added.tpl b/dojo/templates/notifications/slack/engagement_added.tpl index 711fb2d7e7..212f0f5ee3 100644 --- a/dojo/templates/notifications/slack/engagement_added.tpl +++ b/dojo/templates/notifications/slack/engagement_added.tpl @@ -3,8 +3,8 @@ {% blocktranslate trimmed with name=engagement.name eng_product=engagement.product eng_url=url|full_url %} The engagement "{{ name }}" has been created in the product "{{ eng_product }}". It can be viewed here: {{ eng_url }} {% endblocktranslate %} -{% if system_settings.disclaimer and system_settings.disclaimer.strip %} +{% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %} {% trans "Disclaimer" %}: - {{ system_settings.disclaimer }} + {{ system_settings.disclaimer_notifications }} {% endif %} diff --git a/dojo/templates/notifications/slack/other.tpl b/dojo/templates/notifications/slack/other.tpl index 0bbe40eb8b..f371af5263 100644 --- a/dojo/templates/notifications/slack/other.tpl +++ b/dojo/templates/notifications/slack/other.tpl @@ -6,8 +6,8 @@ More information on this event can be found here: {{ event_url }} {% endblocktranslate %} {% endif %} -{% if system_settings.disclaimer|length %} +{% if system_settings.disclaimer_notifications|length %} {% trans "Disclaimer" %}: - {{ system_settings.disclaimer }} + {{ system_settings.disclaimer_notifications }} {% endif %} diff --git a/dojo/templates/notifications/slack/product_added.tpl b/dojo/templates/notifications/slack/product_added.tpl index ca57b54333..6d1cef8445 100644 --- a/dojo/templates/notifications/slack/product_added.tpl +++ b/dojo/templates/notifications/slack/product_added.tpl @@ -3,8 +3,8 @@ {% blocktranslate trimmed with prod_url=url|full_url %} The new product "{{ title }}" has been added. It can be viewed here: {{ prod_url }} {% endblocktranslate %} -{% if system_settings.disclaimer and system_settings.disclaimer.strip %} +{% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %} {% trans "Disclaimer" %}: - {{ system_settings.disclaimer }} + {{ system_settings.disclaimer_notifications }} {% endif %} diff --git a/dojo/templates/notifications/slack/product_type_added.tpl b/dojo/templates/notifications/slack/product_type_added.tpl index 914114ca43..8818a3f101 100644 --- a/dojo/templates/notifications/slack/product_type_added.tpl +++ b/dojo/templates/notifications/slack/product_type_added.tpl @@ -3,8 +3,8 @@ {% blocktranslate trimmed with prod_url=url|full_url %} The new product type "{{ title }}" has been added. It can be viewed here: {{ prod_url }} {% endblocktranslate %} -{% if system_settings.disclaimer and system_settings.disclaimer.strip %} +{% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %} {% trans "Disclaimer" %}: - {{ system_settings.disclaimer }} + {{ system_settings.disclaimer_notifications }} {% endif %} diff --git a/dojo/templates/notifications/slack/report_created.tpl b/dojo/templates/notifications/slack/report_created.tpl index 29b08597b1..8c5ca4a929 100644 --- a/dojo/templates/notifications/slack/report_created.tpl +++ b/dojo/templates/notifications/slack/report_created.tpl @@ -3,8 +3,8 @@ {% blocktranslate trimmed with name=report.name report_url=url|full_url %} Your report "{{ name }}" is ready. It can be downloaded here: {{ report_url }} {% endblocktranslate %} -{% if system_settings.disclaimer and system_settings.disclaimer.strip %} +{% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %} {% trans "Disclaimer" %}: - {{ system_settings.disclaimer }} + {{ system_settings.disclaimer_notifications }} {% endif %} diff --git a/dojo/templates/notifications/slack/review_requested.tpl b/dojo/templates/notifications/slack/review_requested.tpl index 64a78af408..395954e774 100644 --- a/dojo/templates/notifications/slack/review_requested.tpl +++ b/dojo/templates/notifications/slack/review_requested.tpl @@ -15,7 +15,7 @@ {% trans "Full details of the finding can be reviewed at" %} {{ url|full_url }} -{% if system_settings.disclaimer and system_settings.disclaimer.strip %} +{% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %} {% trans "Disclaimer:" %} - {{ system_settings.disclaimer }} + {{ system_settings.disclaimer_notifications }} {% endif %} diff --git a/dojo/templates/notifications/slack/risk_acceptance_expiration.tpl b/dojo/templates/notifications/slack/risk_acceptance_expiration.tpl index e3751c7abf..d5222c8182 100644 --- a/dojo/templates/notifications/slack/risk_acceptance_expiration.tpl +++ b/dojo/templates/notifications/slack/risk_acceptance_expiration.tpl @@ -11,8 +11,8 @@ {% blocktranslate trimmed with risk_url=risk_acceptance_url|full_url %} Risk Acceptance can be viewed here: {{ risk_url }} {% endblocktranslate %} -{% if system_settings.disclaimer and system_settings.disclaimer.strip %} +{% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %} {% trans "Disclaimer" %}: - {{ system_settings.disclaimer }} + {{ system_settings.disclaimer_notifications }} {% endif %} diff --git a/dojo/templates/notifications/slack/scan_added.tpl b/dojo/templates/notifications/slack/scan_added.tpl index aa72932e8f..97488ee6c0 100644 --- a/dojo/templates/notifications/slack/scan_added.tpl +++ b/dojo/templates/notifications/slack/scan_added.tpl @@ -8,8 +8,8 @@ They can be viewed here: {{ scan_url }} {% endblocktranslate %} {% endif %} -{% if system_settings.disclaimer and system_settings.disclaimer.strip %} +{% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %} {% trans "Disclaimer" %}: - {{ system_settings.disclaimer }} + {{ system_settings.disclaimer_notifications }} {% endif %} diff --git a/dojo/templates/notifications/slack/sla_breach.tpl b/dojo/templates/notifications/slack/sla_breach.tpl index fc6913e005..0e9d4ce9e5 100644 --- a/dojo/templates/notifications/slack/sla_breach.tpl +++ b/dojo/templates/notifications/slack/sla_breach.tpl @@ -6,8 +6,8 @@ Title: {{title}} Severity: {{severity}} You can find details here: {{ sla_url }} {% endblocktranslate %} -{% if system_settings.disclaimer and system_settings.disclaimer.strip %} +{% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %} {% trans "Disclaimer" %}: - {{ system_settings.disclaimer }} + {{ system_settings.disclaimer_notifications }} {% endif %} diff --git a/dojo/templates/notifications/slack/test_added.tpl b/dojo/templates/notifications/slack/test_added.tpl index 38c9a9b752..fddccc1e81 100644 --- a/dojo/templates/notifications/slack/test_added.tpl +++ b/dojo/templates/notifications/slack/test_added.tpl @@ -6,8 +6,8 @@ Title: {{title}} Type: {{ test_type }} You can find details here: {{ test_url }} {% endblocktranslate %} -{% if system_settings.disclaimer and system_settings.disclaimer.strip %} +{% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %} {% trans "Disclaimer" %}: - {{ system_settings.disclaimer }} + {{ system_settings.disclaimer_notifications }} {% endif %} diff --git a/dojo/templates/notifications/slack/upcoming_engagement.tpl b/dojo/templates/notifications/slack/upcoming_engagement.tpl index 59f64529da..1b2e80df6d 100644 --- a/dojo/templates/notifications/slack/upcoming_engagement.tpl +++ b/dojo/templates/notifications/slack/upcoming_engagement.tpl @@ -1,8 +1,8 @@ {% load i18n %}{% blocktranslate trimmed with eng_product=engagement.product start=engagement.target_start %} The engagement "{{ eng_product }}" is starting on {{ start }}. {% endblocktranslate %} -{% if system_settings.disclaimer and system_settings.disclaimer.strip %} +{% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %} {% trans "Disclaimer" %}: - {{ system_settings.disclaimer }} + {{ system_settings.disclaimer_notifications }} {% endif %} diff --git a/dojo/templates/notifications/slack/user_mentioned.tpl b/dojo/templates/notifications/slack/user_mentioned.tpl index 3d1cf77801..aba6c9aed6 100644 --- a/dojo/templates/notifications/slack/user_mentioned.tpl +++ b/dojo/templates/notifications/slack/user_mentioned.tpl @@ -5,8 +5,8 @@ User {{ user }} jotted a note on {{ section }}: Full details of the note can be reviewed at {{ url }} {% endblocktranslate %} -{% if system_settings.disclaimer and system_settings.disclaimer.strip %} +{% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %} {% trans "Disclaimer" %}: - {{ system_settings.disclaimer }} + {{ system_settings.disclaimer_notifications }} {% endif %} diff --git a/dojo/templates/notifications/webhooks/subtemplates/base.tpl b/dojo/templates/notifications/webhooks/subtemplates/base.tpl index 44946cd8dd..3761f986a3 100644 --- a/dojo/templates/notifications/webhooks/subtemplates/base.tpl +++ b/dojo/templates/notifications/webhooks/subtemplates/base.tpl @@ -8,6 +8,6 @@ url_ui: {{ url|full_url }} {% if url_api %} url_api: {{ url_api|full_url }} {% endif %} -{% if system_settings.disclaimer and system_settings.disclaimer.strip %} -disclaimer: {{ system_settings.disclaimer }} +{% if system_settings.disclaimer_notifications and system_settings.disclaimer_notifications.strip %} +disclaimer: {{ system_settings.disclaimer_notifications }} {% endif %}