Skip to content

Commit

Permalink
history panel is hidden for end user role
Browse files Browse the repository at this point in the history
  • Loading branch information
Kateryna Honchar committed Aug 8, 2022
1 parent c8e312b commit 886591c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,64 +186,6 @@ private Component createWidget(String markupId, IModel<ContainerPanelConfigurati
}

return panel;


// Class<?> type = WebComponentUtil.qnameToClass(PrismContext.get(), model.getObject().getType());
// if (AssignmentType.class.equals(type)) {
// return new MyAccessesPreviewDataPanel(markupId, null, model.getObject());
// }
//
// if (CaseType.class.equals(type)) {
// return createMyRequestsPanel(markupId, model.getObject());
// }
//
// if (CaseWorkItemType.class.equals(type)) {
// return createMyWorkItemsPanel(markupId, model.getObject());
// }
//
// return new WebMarkupContainer(markupId);
}

// private Component createMyWorkItemsPanel(String markupId, ContainerPanelConfigurationType config) {
// CaseWorkItemsPanel workItemsPanel = new CaseWorkItemsPanel(markupId, CaseWorkItemsPanel.View.DASHBOARD, config) {
// private static final long serialVersionUID = 1L;
//
// @Override
// protected ObjectFilter getCaseWorkItemsFilter() {
// return QueryUtils.filterForNotClosedStateAndAssignees(getPrismContext().queryFor(CaseWorkItemType.class),
// AuthUtil.getPrincipalUser(),
// OtherPrivilegesLimitationType.F_APPROVAL_WORK_ITEMS, getPageBase().getRelationRegistry())
// .desc(F_CREATE_TIMESTAMP)
// .buildFilter();
// }
// };
// workItemsPanel.setOutputMarkupId(true);
// return workItemsPanel;
// }

private Component createMyRequestsPanel(String markupId, ContainerPanelConfigurationType config) {
CasesTablePanel cases = new CasesTablePanel(markupId, null, config) {

@Override
protected ObjectFilter getCasesFilter() {
return QueryUtils.filterForMyRequests(getPrismContext().queryFor(CaseType.class),
AuthUtil.getPrincipalUser().getOid())
.desc(ItemPath.create(CaseType.F_METADATA, MetadataType.F_CREATE_TIMESTAMP))
.buildFilter();
}

@Override
protected boolean isDashboard() {
return true;
}

@Override
protected UserProfileStorage.TableId getTableId() {
return UserProfileStorage.TableId.PAGE_CASE_CHILD_CASES_TAB;
}
};
cases.setDashboard(true);
return cases;
}

private UserInterfaceElementVisibilityType getComponentVisibility(PredefinedDashboardWidgetId componentId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,19 @@
<identifier>myWorkItems</identifier>
<visibility>hidden</visibility>
</widget>
<widget>
<identifier>myHistory</identifier>
<visibility>hidden</visibility>
</widget>
</homePage>
<objectDetails>
<objectDetailsPage>
<type>UserType</type>
<panel>
<identifier>history</identifier>
<visibility>hidden</visibility>
</panel>
</objectDetailsPage>
</objectDetails>
</adminGuiConfiguration>
</role>

0 comments on commit 886591c

Please sign in to comment.