Skip to content

Commit 190c580

Browse files
Validating permission for self-reporting component
1 parent 9f83e52 commit 190c580

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataView.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,11 +254,12 @@ protected void initView(String params) {
254254
layout.addSidePanelComponent(new SideComponentLayout(specialAccessListComponent), SPECIAL_ACCESSES_LOC);
255255
}
256256

257-
SelfReportListComponent selfReportListComponent =
258-
new SelfReportListComponent(SelfReportType.CASE, new SelfReportCriteria().setCaze(new CaseReferenceDto(caze.getUuid())));
259-
SelfReportListComponentLayout selfReportListComponentLayout = new SelfReportListComponentLayout(selfReportListComponent);
260-
layout.addSidePanelComponent(selfReportListComponentLayout, SELF_REPORT_LOC);
261-
257+
if (UiUtil.permitted(FeatureType.SELF_REPORTING)) {
258+
SelfReportListComponent selfReportListComponent =
259+
new SelfReportListComponent(SelfReportType.CASE, new SelfReportCriteria().setCaze(new CaseReferenceDto(caze.getUuid())));
260+
SelfReportListComponentLayout selfReportListComponentLayout = new SelfReportListComponentLayout(selfReportListComponent);
261+
layout.addSidePanelComponent(selfReportListComponentLayout, SELF_REPORT_LOC);
262+
}
262263
if (UiUtil.permitted(FeatureType.SURVEYS)) {
263264
SurveyListComponentLayout surveyList = new SurveyListComponentLayout(
264265
caze.toReference(),

0 commit comments

Comments
 (0)