From e3c3117a32a791823c5cd06c08474e6e64f3c38b Mon Sep 17 00:00:00 2001 From: Loc Nguyen Date: Wed, 4 Dec 2024 17:51:08 +0700 Subject: [PATCH] feature/IVYPORTAL-18054-Iframe-task-template-Missing-permission-check-for-Case-information-LE - Fix case not found --- AxonIvyPortal/portal/cms/cms.yaml | 2 +- AxonIvyPortal/portal/cms/cms_de.yaml | 2 +- AxonIvyPortal/portal/cms/cms_en.yaml | 2 +- AxonIvyPortal/portal/cms/cms_es.yaml | 2 +- AxonIvyPortal/portal/cms/cms_fr.yaml | 2 +- .../portal/generic/bean/AbstractTaskTemplateBean.java | 2 +- .../layouts/restricted/AbstractTaskTemplate.xhtml | 8 ++++---- AxonIvyPortal/portal/webContent/resources/css/module.css | 5 +++++ 8 files changed, 15 insertions(+), 10 deletions(-) diff --git a/AxonIvyPortal/portal/cms/cms.yaml b/AxonIvyPortal/portal/cms/cms.yaml index 896f00b7270..865c4f9a304 100644 --- a/AxonIvyPortal/portal/cms/cms.yaml +++ b/AxonIvyPortal/portal/cms/cms.yaml @@ -1,6 +1,6 @@ ch.ivy.addon.portal.generic: CaseDetailsTemplate: - noCaseId: No case-Id specified + noCaseFound: Case not found or you don't have permission to view this case. requestTabTitle: Request statusTabTitle: Case Information OpenTaskTemplate: diff --git a/AxonIvyPortal/portal/cms/cms_de.yaml b/AxonIvyPortal/portal/cms/cms_de.yaml index d1f85cba9f2..0267078871e 100644 --- a/AxonIvyPortal/portal/cms/cms_de.yaml +++ b/AxonIvyPortal/portal/cms/cms_de.yaml @@ -1,6 +1,6 @@ ch.ivy.addon.portal.generic: CaseDetailsTemplate: - noCaseId: Keine Vorgangs-ID spezifiziert + noCaseFound: Fall nicht gefunden oder Sie haben keine Berechtigung, diesen Fall zu sehen. requestTabTitle: Anfrage statusTabTitle: Vorgangsinformationen OpenTaskTemplate: diff --git a/AxonIvyPortal/portal/cms/cms_en.yaml b/AxonIvyPortal/portal/cms/cms_en.yaml index edcfc633ea7..aee201428bf 100644 --- a/AxonIvyPortal/portal/cms/cms_en.yaml +++ b/AxonIvyPortal/portal/cms/cms_en.yaml @@ -1,6 +1,6 @@ ch.ivy.addon.portal.generic: CaseDetailsTemplate: - noCaseId: No case-Id specified + noCaseFound: Case not found or you don't have permission to view this case. requestTabTitle: Request statusTabTitle: Case Information OpenTaskTemplate: diff --git a/AxonIvyPortal/portal/cms/cms_es.yaml b/AxonIvyPortal/portal/cms/cms_es.yaml index 5f54bd19892..f74b3738de8 100644 --- a/AxonIvyPortal/portal/cms/cms_es.yaml +++ b/AxonIvyPortal/portal/cms/cms_es.yaml @@ -1,6 +1,6 @@ ch.ivy.addon.portal.generic: CaseDetailsTemplate: - noCaseId: No hay ID de caso especificado + noCaseFound: Caso no encontrado o no tienes permiso para ver este caso. requestTabTitle: Solicitud statusTabTitle: Información del caso OpenTaskTemplate: diff --git a/AxonIvyPortal/portal/cms/cms_fr.yaml b/AxonIvyPortal/portal/cms/cms_fr.yaml index cad0ec2d686..53419436396 100644 --- a/AxonIvyPortal/portal/cms/cms_fr.yaml +++ b/AxonIvyPortal/portal/cms/cms_fr.yaml @@ -1,6 +1,6 @@ ch.ivy.addon.portal.generic: CaseDetailsTemplate: - noCaseId: Aucun numéro de dossier n'a été indiqué + noCaseFound: Cas non trouvé ou vous n'avez pas la permission de voir ce cas. requestTabTitle: Demande statusTabTitle: Informations sur le dossier OpenTaskTemplate: diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/AbstractTaskTemplateBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/AbstractTaskTemplateBean.java index 5fbf065d0b5..d02d42b2414 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/AbstractTaskTemplateBean.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/AbstractTaskTemplateBean.java @@ -159,7 +159,7 @@ private int getFirstTerminatingStageIndex(List stages) { } public void generateCaseDetailInFrame(ICase currentCase) { - setCaseDetailsLink(PortalNavigator.buildPortalCaseDetailInFrameUrl(currentCase.uuid())); + setCaseDetailsLink(PortalNavigator.buildPortalCaseDetailInFrameUrl(currentCase != null ? currentCase.uuid() : null)); } public Long getIntervalForPollingWhenOpenCaseDetails() { diff --git a/AxonIvyPortal/portal/webContent/layouts/restricted/AbstractTaskTemplate.xhtml b/AxonIvyPortal/portal/webContent/layouts/restricted/AbstractTaskTemplate.xhtml index 21f9cc4a85a..402dd8c7b40 100644 --- a/AxonIvyPortal/portal/webContent/layouts/restricted/AbstractTaskTemplate.xhtml +++ b/AxonIvyPortal/portal/webContent/layouts/restricted/AbstractTaskTemplate.xhtml @@ -160,14 +160,14 @@ - - +