Unverified 提交 c793eb41 authored 作者: Junjun's avatar Junjun 提交者: GitHub

Merge pull request #1844 from dataease/pr@v1.8@refactor_permission

refactor: 数据集视图权限
...@@ -34,7 +34,6 @@ public class ChartViewController { ...@@ -34,7 +34,6 @@ public class ChartViewController {
@Resource @Resource
private ChartViewService chartViewService; private ChartViewService chartViewService;
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_MANAGE) @DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_MANAGE)
@ApiOperation("保存") @ApiOperation("保存")
@PostMapping("/save/{panelId}") @PostMapping("/save/{panelId}")
...@@ -56,7 +55,6 @@ public class ChartViewController { ...@@ -56,7 +55,6 @@ public class ChartViewController {
return chartViewService.listAndGroup(chartViewRequest); return chartViewService.listAndGroup(chartViewRequest);
} }
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_VIEW, paramIndex = 1) @DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_VIEW, paramIndex = 1)
@ApiOperation("详细信息") @ApiOperation("详细信息")
@PostMapping("/get/{id}/{panelId}") @PostMapping("/get/{id}/{panelId}")
...@@ -71,7 +69,6 @@ public class ChartViewController { ...@@ -71,7 +69,6 @@ public class ChartViewController {
chartViewService.delete(id); chartViewService.delete(id);
} }
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_VIEW, paramIndex = 1) @DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_VIEW, paramIndex = 1)
@ApiOperation("数据") @ApiOperation("数据")
@PostMapping("/getData/{id}/{panelId}") @PostMapping("/getData/{id}/{panelId}")
...@@ -79,7 +76,6 @@ public class ChartViewController { ...@@ -79,7 +76,6 @@ public class ChartViewController {
return chartViewService.getData(id, requestList); return chartViewService.getData(id, requestList);
} }
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_VIEW, paramIndex = 1) @DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_VIEW, paramIndex = 1)
@ApiOperation("视图详情") @ApiOperation("视图详情")
@PostMapping("chartDetail/{id}/{panelId}") @PostMapping("chartDetail/{id}/{panelId}")
...@@ -87,7 +83,6 @@ public class ChartViewController { ...@@ -87,7 +83,6 @@ public class ChartViewController {
return chartViewService.getChartDetail(id); return chartViewService.getChartDetail(id);
} }
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_MANAGE, paramIndex = 1) @DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_MANAGE, paramIndex = 1)
@ApiOperation("复制") @ApiOperation("复制")
@PostMapping("chartCopy/{id}/{panelId}") @PostMapping("chartCopy/{id}/{panelId}")
...@@ -101,13 +96,13 @@ public class ChartViewController { ...@@ -101,13 +96,13 @@ public class ChartViewController {
return chartViewService.searchAdviceSceneId(panelId); return chartViewService.searchAdviceSceneId(panelId);
} }
@ApiIgnore
@ApiOperation("搜索") @ApiOperation("搜索")
@PostMapping("search") @PostMapping("search")
public List<ChartViewDTO> search(@RequestBody ChartViewRequest chartViewRequest) { public List<ChartViewDTO> search(@RequestBody ChartViewRequest chartViewRequest) {
return chartViewService.search(chartViewRequest); return chartViewService.search(chartViewRequest);
} }
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_VIEW) @DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_VIEW)
@ApiOperation("计算结果") @ApiOperation("计算结果")
@PostMapping("/calcData/{panelId}") @PostMapping("/calcData/{panelId}")
......
...@@ -84,7 +84,6 @@ public class DataSetTableController { ...@@ -84,7 +84,6 @@ public class DataSetTableController {
dataSetTableService.delete(id); dataSetTableService.delete(id);
} }
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_USE, value = "sceneId") @DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_USE, value = "sceneId")
@ApiOperation("查询") @ApiOperation("查询")
@PostMapping("list") @PostMapping("list")
...@@ -92,7 +91,6 @@ public class DataSetTableController { ...@@ -92,7 +91,6 @@ public class DataSetTableController {
return dataSetTableService.list(dataSetTableRequest); return dataSetTableService.list(dataSetTableRequest);
} }
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_USE, value = "sceneId") @DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_USE, value = "sceneId")
@ApiOperation("查询组") @ApiOperation("查询组")
@PostMapping("listAndGroup") @PostMapping("listAndGroup")
...@@ -100,7 +98,6 @@ public class DataSetTableController { ...@@ -100,7 +98,6 @@ public class DataSetTableController {
return dataSetTableService.listAndGroup(dataSetTableRequest); return dataSetTableService.listAndGroup(dataSetTableRequest);
} }
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_USE) @DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_USE)
@ApiOperation("详息") @ApiOperation("详息")
@PostMapping("get/{id}") @PostMapping("get/{id}")
...@@ -108,7 +105,6 @@ public class DataSetTableController { ...@@ -108,7 +105,6 @@ public class DataSetTableController {
return dataSetTableService.get(id); return dataSetTableService.get(id);
} }
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_USE) @DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_USE)
@ApiOperation("带权限查询") @ApiOperation("带权限查询")
@PostMapping("getWithPermission/{id}") @PostMapping("getWithPermission/{id}")
...@@ -116,7 +112,6 @@ public class DataSetTableController { ...@@ -116,7 +112,6 @@ public class DataSetTableController {
return dataSetTableService.getWithPermission(id, null); return dataSetTableService.getWithPermission(id, null);
} }
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASOURCE, level = ResourceAuthLevel.DATASOURCE_LEVEL_USE, value = "dataSourceId") @DePermission(type = DePermissionType.DATASOURCE, level = ResourceAuthLevel.DATASOURCE_LEVEL_USE, value = "dataSourceId")
@ApiOperation("查询原始字段") @ApiOperation("查询原始字段")
@PostMapping("getFields") @PostMapping("getFields")
...@@ -124,7 +119,6 @@ public class DataSetTableController { ...@@ -124,7 +119,6 @@ public class DataSetTableController {
return dataSetTableService.getFields(datasetTable); return dataSetTableService.getFields(datasetTable);
} }
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_USE, value = "id") @DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_USE, value = "id")
@ApiOperation("查询生成字段") @ApiOperation("查询生成字段")
@PostMapping("getFieldsFromDE") @PostMapping("getFieldsFromDE")
...@@ -132,7 +126,6 @@ public class DataSetTableController { ...@@ -132,7 +126,6 @@ public class DataSetTableController {
return dataSetTableService.getFieldsFromDE(dataSetTableRequest); return dataSetTableService.getFieldsFromDE(dataSetTableRequest);
} }
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_USE, value = "id") @DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_USE, value = "id")
@ApiOperation("查询预览数据") @ApiOperation("查询预览数据")
@PostMapping("getPreviewData/{page}/{pageSize}") @PostMapping("getPreviewData/{page}/{pageSize}")
...@@ -140,7 +133,6 @@ public class DataSetTableController { ...@@ -140,7 +133,6 @@ public class DataSetTableController {
return dataSetTableService.getPreviewData(dataSetTableRequest, page, pageSize, null); return dataSetTableService.getPreviewData(dataSetTableRequest, page, pageSize, null);
} }
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASOURCE, level = ResourceAuthLevel.DATASOURCE_LEVEL_USE, value = "dataSourceId") @DePermission(type = DePermissionType.DATASOURCE, level = ResourceAuthLevel.DATASOURCE_LEVEL_USE, value = "dataSourceId")
@ApiOperation("根据sql查询预览数据") @ApiOperation("根据sql查询预览数据")
@PostMapping("sqlPreview") @PostMapping("sqlPreview")
...@@ -148,7 +140,6 @@ public class DataSetTableController { ...@@ -148,7 +140,6 @@ public class DataSetTableController {
return dataSetTableService.getSQLPreview(dataSetTableRequest); return dataSetTableService.getSQLPreview(dataSetTableRequest);
} }
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASOURCE, level = ResourceAuthLevel.DATASOURCE_LEVEL_USE, value = "dataSourceId") @DePermission(type = DePermissionType.DATASOURCE, level = ResourceAuthLevel.DATASOURCE_LEVEL_USE, value = "dataSourceId")
@ApiOperation("预览自定义数据数据") @ApiOperation("预览自定义数据数据")
@PostMapping("customPreview") @PostMapping("customPreview")
...@@ -172,7 +163,6 @@ public class DataSetTableController { ...@@ -172,7 +163,6 @@ public class DataSetTableController {
dataSetTableService.saveIncrementalConfig(datasetTableIncrementalConfig); dataSetTableService.saveIncrementalConfig(datasetTableIncrementalConfig);
} }
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET) @DePermission(type = DePermissionType.DATASET)
@ApiOperation("数据集详息") @ApiOperation("数据集详息")
@PostMapping("datasetDetail/{id}") @PostMapping("datasetDetail/{id}")
...@@ -206,7 +196,6 @@ public class DataSetTableController { ...@@ -206,7 +196,6 @@ public class DataSetTableController {
return dataSetTableService.search(dataSetTableRequest); return dataSetTableService.search(dataSetTableRequest);
} }
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_MANAGE) @DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
@ApiOperation("数据集同步表结构") @ApiOperation("数据集同步表结构")
@PostMapping("syncField/{id}") @PostMapping("syncField/{id}")
......
...@@ -58,7 +58,6 @@ public class DataSetTableFieldController { ...@@ -58,7 +58,6 @@ public class DataSetTableFieldController {
@Resource @Resource
private PermissionService permissionService; private PermissionService permissionService;
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET) @DePermission(type = DePermissionType.DATASET)
@ApiOperation("查询表下属字段") @ApiOperation("查询表下属字段")
@PostMapping("list/{tableId}") @PostMapping("list/{tableId}")
...@@ -70,7 +69,6 @@ public class DataSetTableFieldController { ...@@ -70,7 +69,6 @@ public class DataSetTableFieldController {
return fields; return fields;
} }
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET) @DePermission(type = DePermissionType.DATASET)
@ApiOperation("查询表下属字段") @ApiOperation("查询表下属字段")
@PostMapping("listWithPermission/{tableId}") @PostMapping("listWithPermission/{tableId}")
...@@ -85,7 +83,6 @@ public class DataSetTableFieldController { ...@@ -85,7 +83,6 @@ public class DataSetTableFieldController {
} }
//管理权限,可以列出所有字段 //管理权限,可以列出所有字段
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET) @DePermission(type = DePermissionType.DATASET)
@ApiOperation("查询表下属字段") @ApiOperation("查询表下属字段")
@PostMapping("listForPermissionSeting/{tableId}") @PostMapping("listForPermissionSeting/{tableId}")
...@@ -97,7 +94,6 @@ public class DataSetTableFieldController { ...@@ -97,7 +94,6 @@ public class DataSetTableFieldController {
} }
//管理权限,可以列出所有字段 //管理权限,可以列出所有字段
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET) @DePermission(type = DePermissionType.DATASET)
@ApiOperation("分组查询表下属字段") @ApiOperation("分组查询表下属字段")
@PostMapping("listByDQ/{tableId}") @PostMapping("listByDQ/{tableId}")
...@@ -115,7 +111,6 @@ public class DataSetTableFieldController { ...@@ -115,7 +111,6 @@ public class DataSetTableFieldController {
return datasetTableField4Type; return datasetTableField4Type;
} }
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET, value = "tableId", level = ResourceAuthLevel.DATASET_LEVEL_MANAGE) @DePermission(type = DePermissionType.DATASET, value = "tableId", level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
@ApiOperation("批量更新") @ApiOperation("批量更新")
@PostMapping("batchEdit") @PostMapping("batchEdit")
...@@ -123,7 +118,6 @@ public class DataSetTableFieldController { ...@@ -123,7 +118,6 @@ public class DataSetTableFieldController {
dataSetTableFieldsService.batchEdit(list); dataSetTableFieldsService.batchEdit(list);
} }
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET, value = "tableId", level = ResourceAuthLevel.DATASET_LEVEL_MANAGE) @DePermission(type = DePermissionType.DATASET, value = "tableId", level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
@ApiOperation("保存") @ApiOperation("保存")
@PostMapping("save") @PostMapping("save")
...@@ -141,7 +135,6 @@ public class DataSetTableFieldController { ...@@ -141,7 +135,6 @@ public class DataSetTableFieldController {
return dataSetTableFieldsService.save(datasetTableField); return dataSetTableFieldsService.save(datasetTableField);
} }
@RequiresPermissions("data:read")
@DePermissions(value = { @DePermissions(value = {
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_MANAGE, paramIndex = 1) @DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_MANAGE, paramIndex = 1)
}) })
......
...@@ -29,7 +29,6 @@ public class DatasetFunctionController { ...@@ -29,7 +29,6 @@ public class DatasetFunctionController {
@Resource @Resource
private DatasetFunctionService datasetFunctionService; private DatasetFunctionService datasetFunctionService;
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_MANAGE) @DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
@ApiOperation("查询") @ApiOperation("查询")
@PostMapping("listByTableId/{tableId}") @PostMapping("listByTableId/{tableId}")
......
...@@ -86,7 +86,6 @@ public class DatasourceController { ...@@ -86,7 +86,6 @@ public class DatasourceController {
datasourceService.updateDatasource(Datasource); datasourceService.updateDatasource(Datasource);
} }
@RequiresPermissions("datasource:read")
@DePermission(type = DePermissionType.DATASOURCE, value = "id") @DePermission(type = DePermissionType.DATASOURCE, value = "id")
@ApiOperation("查询数据源下属所有表") @ApiOperation("查询数据源下属所有表")
@PostMapping("/getTables") @PostMapping("/getTables")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论