From cc5f9de208105150d5fc210de8c7202fa521baca Mon Sep 17 00:00:00 2001 From: Randy Woods Date: Fri, 14 Feb 2025 09:20:30 -0700 Subject: [PATCH] Disable export POAM link if target level 1 If the assessment is targeting Level 1, a POAM is not applicable, so the link is disabled. It is only enabled if the target level is > 1 and Level 1 has been achieved. --- .../results/reports/report-list/report-list.component.ts | 8 ++++++-- CSETWebNg/src/app/services/authentication.service.ts | 2 +- CSETWebNg/src/assets/i18n/reports/en.json | 2 +- CSETWebNg/src/assets/i18n/reports/es.json | 2 +- CSETWebNg/src/assets/i18n/reports/uk.json | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CSETWebNg/src/app/assessment/results/reports/report-list/report-list.component.ts b/CSETWebNg/src/app/assessment/results/reports/report-list/report-list.component.ts index e9271350e5..a77674b629 100644 --- a/CSETWebNg/src/app/assessment/results/reports/report-list/report-list.component.ts +++ b/CSETWebNg/src/app/assessment/results/reports/report-list/report-list.component.ts @@ -82,11 +82,15 @@ export class ReportListComponent implements OnInit { } /** - * If this is a CMMC assessment, check the score for Level 1. + * If this is a CMMC assessment and the target level is + * higher than Level 1, check the score for Level 1. */ setCmmcLevelAchievement() { + const a = this.assessSvc.assessment; + const cmmcModels = ['CMMC', 'CMMC2', 'CMMC2F']; - if (cmmcModels.indexOf(this.assessSvc.assessment.maturityModel?.modelName) >= 0) { + if (a.maturityModel?.maturityTargetLevel > 1 && + cmmcModels.indexOf(a.maturityModel?.modelName) >= 0) { this.maturitySvc.getCmmcScores().subscribe((scores: any) => { this.cmmcLevel1Achieved = scores.level1Score == scores.level1MaxScore; }); diff --git a/CSETWebNg/src/app/services/authentication.service.ts b/CSETWebNg/src/app/services/authentication.service.ts index 3f3a660b7f..65f3dc36b7 100644 --- a/CSETWebNg/src/app/services/authentication.service.ts +++ b/CSETWebNg/src/app/services/authentication.service.ts @@ -135,7 +135,7 @@ export class AuthenticationService { }, (error) => { - console.warn('Error getting stand-alone status. Assuming non-stand-alone mode.'); + console.warn('Error getting stand-alone status. Assuming Enterprise configuration.'); this.isLocal = false; } ); diff --git a/CSETWebNg/src/assets/i18n/reports/en.json b/CSETWebNg/src/assets/i18n/reports/en.json index 59d0eec7df..be4782728a 100644 --- a/CSETWebNg/src/assets/i18n/reports/en.json +++ b/CSETWebNg/src/assets/i18n/reports/en.json @@ -107,7 +107,7 @@ }, "4": { "title": "Export POAM to Excel", - "desc": "This report generates a Plan of Action and Milestones (POA&M) template which includes a list of unmet practices eligible for remediation. This POA&M will exclude any CMMC practices that are ineligible for inclusion per CMMC ruling. It is available for assessments that have achieved Level 1 or above." + "desc": "This report generates a Plan of Action and Milestones (POA&M) template which includes a list of unmet practices eligible for remediation. This POA&M will exclude any CMMC practices that are ineligible for inclusion per CMMC ruling. It is available for assessments that are targeting a Level 2 or 3 and have achieved Level 1." } }, "rra": { diff --git a/CSETWebNg/src/assets/i18n/reports/es.json b/CSETWebNg/src/assets/i18n/reports/es.json index ba9e83487f..f7133171ed 100644 --- a/CSETWebNg/src/assets/i18n/reports/es.json +++ b/CSETWebNg/src/assets/i18n/reports/es.json @@ -16,7 +16,7 @@ }, "4": { "title": "Exportar POAM a Excel", - "desc": "Este informe genera una plantilla de Plan de acción e hitos (POA&M) que incluye una lista de prácticas no cumplidas que pueden remediarse. Este POA&M excluirá cualquier práctica de CMMC que no sea elegible para su inclusión según la resolución de CMMC. Está disponible para evaluaciones que hayan alcanzado el Nivel 1 o superior." + "desc": "Este informe genera una plantilla de Plan de acción e hitos (POA&M) que incluye una lista de prácticas no cumplidas que pueden remediarse. Este POA&M excluirá cualquier práctica de CMMC que no sea elegible para su inclusión según la resolución de CMMC. Está disponible para evaluaciones que apuntan a un Nivel 2 o 3 y han alcanzado el Nivel 1." } } }, diff --git a/CSETWebNg/src/assets/i18n/reports/uk.json b/CSETWebNg/src/assets/i18n/reports/uk.json index fce6f3ded7..5672238740 100644 --- a/CSETWebNg/src/assets/i18n/reports/uk.json +++ b/CSETWebNg/src/assets/i18n/reports/uk.json @@ -42,7 +42,7 @@ }, "4": { "title": "Експорт POAM в Excel", - "desc": "У цьому звіті створюється шаблон плану дій і основних етапів (POA&M), який містить список недотриманих практик, які підлягають виправленню. Це POA&M виключатиме будь-які практики CMMC, які не підлягають включенню відповідно до рішення CMMC. Він доступний для оцінювання, яке досягло рівня 1 або вище." + "desc": "У цьому звіті створюється шаблон плану дій і основних етапів (POA&M), який містить список недотриманих практик, які підлягають виправленню. Це POA&M виключатиме будь-які практики CMMC, які не підлягають включенню відповідно до рішення CMMC. Він доступний для оцінювання, яке націлено на рівень 2 або 3 і досягло рівня 1." } } },