Skip to content

Commit

Permalink
feature/IVYPORTAL-18054-Iframe-task-template-Missing-permission-check…
Browse files Browse the repository at this point in the history
…-for-Case-information-LE - Fix case not have permission
  • Loading branch information
ntloc-axonivy committed Dec 5, 2024
1 parent e3c3117 commit d6f3f63
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
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:
noCaseFound: Fall nicht gefunden oder Sie haben keine Berechtigung, diesen Fall zu sehen.
noCaseFound: Vorgang nicht gefunden oder Sie haben keine Berechtigung, diesen Vorgang zu sehen.
requestTabTitle: Anfrage
statusTabTitle: Vorgangsinformationen
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 != null ? currentCase.uuid() : null));
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;
}
}

0 comments on commit d6f3f63

Please sign in to comment.