Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IVYPORTAL-18054 Enhance case information permission for iframe task template #1291

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AxonIvyPortal/portal/cms/cms.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion AxonIvyPortal/portal/cms/cms_de.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ch.ivy.addon.portal.generic:
CaseDetailsTemplate:
noCaseId: Keine Vorgangs-ID spezifiziert
noCaseFound: Vorgang nicht gefunden oder Sie haben keine Berechtigung, diesen Vorgang zu sehen.
requestTabTitle: Anfrage
statusTabTitle: Vorgangsinformationen
OpenTaskTemplate:
Expand Down
2 changes: 1 addition & 1 deletion AxonIvyPortal/portal/cms/cms_en.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion AxonIvyPortal/portal/cms/cms_es.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion AxonIvyPortal/portal/cms/cms_fr.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ private int getFirstTerminatingStageIndex(List<IStage> stages) {
}

public void generateCaseDetailInFrame(ICase currentCase) {
setCaseDetailsLink(PortalNavigator.buildPortalCaseDetailInFrameUrl(currentCase.uuid()));
setCaseDetailsLink(PortalNavigator.buildPortalCaseDetailInFrameUrl(currentCase != null ? currentCase.uuid() : ""));
}

public Long getIntervalForPollingWhenOpenCaseDetails() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import javax.faces.bean.ViewScoped;

import org.apache.commons.collections4.CollectionUtils;

import com.axonivy.portal.enums.SearchScopeCaseField;
import com.axonivy.portal.service.GlobalSearchService;

Expand All @@ -25,6 +26,7 @@
import ch.ivy.addon.portalkit.enums.SessionAttribute;
import ch.ivy.addon.portalkit.enums.TaskSortField;
import ch.ivy.addon.portalkit.exporter.Exporter;
import ch.ivy.addon.portalkit.ivydata.service.impl.CaseService;
import ch.ivy.addon.portalkit.service.CaseFilterService;
import ch.ivy.addon.portalkit.support.HtmlParser;
import ch.ivy.addon.portalkit.util.CaseUtils;
Expand Down Expand Up @@ -221,8 +223,15 @@ public String getGlobalSearchText(CaseLazyDataModel model) {
}
return result;
}

public boolean isShowGlobalSearchScope() {
return GlobalSearchService.getInstance().isShowGlobalSearchByCases();
}

public boolean isCaseFound(ICase caze) {
if (caze != null) {
return CaseService.newInstance().isCaseAccessible(caze.uuid());
}
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,14 @@
</h:panelGroup>
</f:facet>
<ui:insert name="caseDetails">
<h:outputText value="#{ivy.cms.co('/ch.ivy.addon.portal.generic/CaseDetailsTemplate/noCaseId')}"
rendered="#{caseWidgetBean.isHiddenCase(case)}" />
<h:panelGroup id="case-details-panel" layout="block" rendered="#{!caseWidgetBean.isHiddenCase(case)}"
<h:outputText value="#{ivy.cms.co('/ch.ivy.addon.portal.generic/CaseDetailsTemplate/noCaseFound')}"
rendered="#{caseWidgetBean.isHiddenCase(case) or !caseWidgetBean.isCaseFound(case)}" styleClass="no-case-found" />
<h:panelGroup id="case-details-panel" layout="block" rendered="#{!caseWidgetBean.isHiddenCase(case) and caseWidgetBean.isCaseFound(case)}"
styleClass="case-default-widget-container case-details case-details-panel">
<div class="ui-g js-iframe-container">
<div class="ui-g-12 u-padding-0">
<iframe id="i-frame-case-details" src="#{taskTemplateBean.caseDetailsLink}"
onload="setupHeightForIFrame();" class="case-information-frame js-iFrame-case-details"
onload="setupHeightForIFrame();" class="case-information-frame js-iFrame-case-details"
scrolling="no" frameborder="0"
title="#{ivy.cms.co('/Dialogs/com/axonivy/portal/layouts/AbstractTaskTemplate/CaseDetailsIFrameTitle')}" />
</div>
Expand Down
5 changes: 5 additions & 0 deletions AxonIvyPortal/portal/webContent/resources/css/module.css
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,11 @@ span.case-details-document-add-link, span.task-details-document-add-link {
align-self: center;
}

.no-case-found {
margin-left: 21px;
font-size: var(--large-font-size);
}

.case-detail-section-title-container {
display: flex;
}
Expand Down
Loading