You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dojo/db_migrations/0234_finding_cvssv4_finding_cvssv4_score.py
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -32,4 +32,14 @@ class Migration(migrations.Migration):
32
32
name='cvssv4_score',
33
33
field=models.FloatField(blank=True, help_text='Numerical CVSS4 score for the vulnerability. If the vector is given without a score, the score is calcaulated while saving the finding. The value must be between 0-10.', null=True, validators=[django.core.validators.MinValueValidator(0.0), django.core.validators.MaxValueValidator(10.0)], verbose_name='CVSSv4 Score'),
34
34
),
35
+
migrations.AddField(
36
+
model_name='system_settings',
37
+
name='enable_cvss3_display',
38
+
field=models.BooleanField(default=True, help_text='With this setting turned off, CVSS3 fields will be hidden in the user interface.', verbose_name='Enable CVSS3 Display'),
39
+
),
40
+
migrations.AddField(
41
+
model_name='system_settings',
42
+
name='enable_cvss4_display',
43
+
field=models.BooleanField(default=True, help_text='With this setting turned off, CVSS4 fields will be hidden in the user interface.', verbose_name='Enable CVSS4 Display'),
Copy file name to clipboardExpand all lines: dojo/models.py
+11-1Lines changed: 11 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -598,6 +598,16 @@ class System_Settings(models.Model):
598
598
blank=False,
599
599
verbose_name=_("Enable Calendar"),
600
600
help_text=_("With this setting turned off, the Calendar will be disabled in the user interface."))
601
+
enable_cvss3_display=models.BooleanField(
602
+
default=True,
603
+
blank=False,
604
+
verbose_name=_("Enable CVSS3 Display"),
605
+
help_text=_("With this setting turned off, CVSS3 fields will be hidden in the user interface."))
606
+
enable_cvss4_display=models.BooleanField(
607
+
default=True,
608
+
blank=False,
609
+
verbose_name=_("Enable CVSS4 Display"),
610
+
help_text=_("With this setting turned off, CVSS4 fields will be hidden in the user interface."))
601
611
default_group=models.ForeignKey(
602
612
Dojo_Group,
603
613
null=True,
@@ -816,7 +826,7 @@ def clean(self):
816
826
classProduct_Type(models.Model):
817
827
818
828
"""
819
-
Product types represent the top level model, these can be business unit divisions, different offices or locations, development teams, or any other logical way of distinguishing “types” of products.
829
+
Product types represent the top level model, these can be business unit divisions, different offices or locations, development teams, or any other logical way of distinguishing "types" of products.
data-content="{% if finding.cvssv4 %}{{ finding.cvssv4 }} ({{ finding.cvssv4_score }}){% endif %}{% if finding.cvssv4 and finding.cvssv3 %}<br/>{% endif %}{% if finding.cvssv3 %}{{ finding.cvssv3 }} ({{ finding.cvssv3_score }}){% endif %}">
296
-
({% if finding.cvssv4_score %}{{ finding.cvssv4_score }}{% if finding.cvssv3_score %}, {% endif %}{% endif %}{% if finding.cvssv3_score %}{{ finding.cvssv3_score }}{% endif %})</i>
295
+
data-content="{% if system_settings.enable_cvss4_display and finding.cvssv4 %}{{ finding.cvssv4 }} ({{ finding.cvssv4_score }}){% endif %}{% if system_settings.enable_cvss4_display and finding.cvssv4 and system_settings.enable_cvss3_display and finding.cvssv3 %}<br/>{% endif %}{% if system_settings.enable_cvss3_display and finding.cvssv3 %}{{ finding.cvssv3 }} ({{ finding.cvssv3_score }}){% endif %}">
296
+
({% if system_settings.enable_cvss4_display and finding.cvssv4_score %}{{ finding.cvssv4_score }}{% if system_settings.enable_cvss3_display and finding.cvssv3_score %}, {% endif %}{% endif %}{% if system_settings.enable_cvss3_display and finding.cvssv3_score %}{{ finding.cvssv3_score }}{% endif %})</i>
0 commit comments