Source:
public ModulesConfigResponse getModules(@RequestParam("entity") String entityTypeId) { boolean modAggregates = dataExplorerSettings.getModAggregates(); boolean modAnnotators = dataExplorerSettings.getModAnnotators(); boolean modData = dataExplorerSettings.getModData(); boolean modReports = dataExplorerSettings.getModReports(); ModulesConfigResponse modulesConfig = new ModulesConfigResponse(); String aggregatesTitle = messageSource.getMessage("dataexplorer_aggregates_title", new Object[] {}, LocaleContextHolder.getLocale()); if (modData && permissionService.hasPermission(new EntityTypeIdentity(entityTypeId), EntityTypePermission.READ_DATA)) { modulesConfig.add(new ModuleConfig("data", "Data", "grid-icon.png")); } if (modAggregates && dataService.getCapabilities(entityTypeId).contains(RepositoryCapability.AGGREGATEABLE) && permissionService.hasPermission(new EntityTypeIdentity(entityTypeId), EntityTypePermission.AGGREGATE_DATA)) { modulesConfig.add(new ModuleConfig("aggregates", aggregatesTitle, "aggregate-icon.png")); } if (modAnnotators && permissionService.hasPermission(new EntityTypeIdentity(entityTypeId), EntityTypePermission.UPDATE_DATA)) { modulesConfig.add(new ModuleConfig("annotators", "Annotators", "annotator-icon.png")); } if (modReports && permissionService.hasPermission(new EntityTypeIdentity(entityTypeId), EntityTypePermission.READ_DATA) && permissionService.hasPermission(new EntityTypeIdentity(entityTypeId), EntityTypePermission.UPDATE_METADATA)) { String modEntitiesReportName = dataExplorerSettings.getEntityReport(entityTypeId); if (modEntitiesReportName != null) { modulesConfig.add(new ModuleConfig("entitiesreport", modEntitiesReportName, "report-icon.png")); } } return modulesConfig; }

Target:
public ModulesConfigResponse getModules(@RequestParam("entity") String entityTypeId) { boolean modAggregates = dataExplorerSettings.getModAggregates(); boolean modAnnotators = dataExplorerSettings.getModAnnotators(); boolean modData = dataExplorerSettings.getModData(); boolean modReports = dataExplorerSettings.getModReports(); ModulesConfigResponse modulesConfig = new ModulesConfigResponse(); String aggregatesTitle = messageSource.getMessage("dataexplorer_aggregates_title", new Object[] {}, LocaleContextHolder.getLocale()); if (modData && permissionService.hasPermission(new EntityTypeIdentity(entityTypeId), EntityTypePermission.READ_DATA)) { modulesConfig.add(new ModuleConfig("data", "Data", "grid-icon.png")); } if (modAggregates && dataService.getCapabilities(entityTypeId).contains(RepositoryCapability.AGGREGATEABLE) && permissionService.hasPermission(new EntityTypeIdentity(entityTypeId), EntityTypePermission.AGGREGATE_DATA)) { modulesConfig.add(new ModuleConfig("aggregates", aggregatesTitle, "aggregate-icon.png")); } if (modAnnotators && permissionService.hasPermission(new EntityTypeIdentity(entityTypeId), EntityTypePermission.UPDATE_DATA)) { modulesConfig.add(new ModuleConfig("annotators", "Annotators", "annotator-icon.png")); } if (modReports && permissionService.hasPermission(new EntityTypeIdentity(entityTypeId), EntityTypePermission.READ_DATA) && permissionService.hasPermission(new EntityTypeIdentity(entityTypeId), EntityTypePermission.UPDATE_METADATA)) { String modEntitiesReportName = dataExplorerSettings.getEntityReport(entityTypeId); if (modEntitiesReportName != null) { modulesConfig.add(new ModuleConfig(MOD_ENTITIESREPORT, modEntitiesReportName, "report-icon.png")); } } return modulesConfig; }