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

refactor: 数据集视图权限
This commit is contained in:
Junjun 2022-02-28 12:00:13 +08:00 committed by GitHub
commit c793eb4117
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 1 additions and 26 deletions

View File

@ -34,7 +34,6 @@ public class ChartViewController {
@Resource
private ChartViewService chartViewService;
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_MANAGE)
@ApiOperation("保存")
@PostMapping("/save/{panelId}")
@ -56,7 +55,6 @@ public class ChartViewController {
return chartViewService.listAndGroup(chartViewRequest);
}
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_VIEW, paramIndex = 1)
@ApiOperation("详细信息")
@PostMapping("/get/{id}/{panelId}")
@ -71,7 +69,6 @@ public class ChartViewController {
chartViewService.delete(id);
}
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_VIEW, paramIndex = 1)
@ApiOperation("数据")
@PostMapping("/getData/{id}/{panelId}")
@ -79,7 +76,6 @@ public class ChartViewController {
return chartViewService.getData(id, requestList);
}
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_VIEW, paramIndex = 1)
@ApiOperation("视图详情")
@PostMapping("chartDetail/{id}/{panelId}")
@ -87,7 +83,6 @@ public class ChartViewController {
return chartViewService.getChartDetail(id);
}
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_MANAGE, paramIndex = 1)
@ApiOperation("复制")
@PostMapping("chartCopy/{id}/{panelId}")
@ -101,13 +96,13 @@ public class ChartViewController {
return chartViewService.searchAdviceSceneId(panelId);
}
@ApiIgnore
@ApiOperation("搜索")
@PostMapping("search")
public List<ChartViewDTO> search(@RequestBody ChartViewRequest chartViewRequest) {
return chartViewService.search(chartViewRequest);
}
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.PANEL, level = ResourceAuthLevel.PANNEL_LEVEL_VIEW)
@ApiOperation("计算结果")
@PostMapping("/calcData/{panelId}")

View File

@ -84,7 +84,6 @@ public class DataSetTableController {
dataSetTableService.delete(id);
}
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_USE, value = "sceneId")
@ApiOperation("查询")
@PostMapping("list")
@ -92,7 +91,6 @@ public class DataSetTableController {
return dataSetTableService.list(dataSetTableRequest);
}
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_USE, value = "sceneId")
@ApiOperation("查询组")
@PostMapping("listAndGroup")
@ -100,7 +98,6 @@ public class DataSetTableController {
return dataSetTableService.listAndGroup(dataSetTableRequest);
}
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_USE)
@ApiOperation("详息")
@PostMapping("get/{id}")
@ -108,7 +105,6 @@ public class DataSetTableController {
return dataSetTableService.get(id);
}
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_USE)
@ApiOperation("带权限查询")
@PostMapping("getWithPermission/{id}")
@ -116,7 +112,6 @@ public class DataSetTableController {
return dataSetTableService.getWithPermission(id, null);
}
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASOURCE, level = ResourceAuthLevel.DATASOURCE_LEVEL_USE, value = "dataSourceId")
@ApiOperation("查询原始字段")
@PostMapping("getFields")
@ -124,7 +119,6 @@ public class DataSetTableController {
return dataSetTableService.getFields(datasetTable);
}
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_USE, value = "id")
@ApiOperation("查询生成字段")
@PostMapping("getFieldsFromDE")
@ -132,7 +126,6 @@ public class DataSetTableController {
return dataSetTableService.getFieldsFromDE(dataSetTableRequest);
}
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_USE, value = "id")
@ApiOperation("查询预览数据")
@PostMapping("getPreviewData/{page}/{pageSize}")
@ -140,7 +133,6 @@ public class DataSetTableController {
return dataSetTableService.getPreviewData(dataSetTableRequest, page, pageSize, null);
}
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASOURCE, level = ResourceAuthLevel.DATASOURCE_LEVEL_USE, value = "dataSourceId")
@ApiOperation("根据sql查询预览数据")
@PostMapping("sqlPreview")
@ -148,7 +140,6 @@ public class DataSetTableController {
return dataSetTableService.getSQLPreview(dataSetTableRequest);
}
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASOURCE, level = ResourceAuthLevel.DATASOURCE_LEVEL_USE, value = "dataSourceId")
@ApiOperation("预览自定义数据数据")
@PostMapping("customPreview")
@ -172,7 +163,6 @@ public class DataSetTableController {
dataSetTableService.saveIncrementalConfig(datasetTableIncrementalConfig);
}
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET)
@ApiOperation("数据集详息")
@PostMapping("datasetDetail/{id}")
@ -206,7 +196,6 @@ public class DataSetTableController {
return dataSetTableService.search(dataSetTableRequest);
}
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
@ApiOperation("数据集同步表结构")
@PostMapping("syncField/{id}")

View File

@ -58,7 +58,6 @@ public class DataSetTableFieldController {
@Resource
private PermissionService permissionService;
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET)
@ApiOperation("查询表下属字段")
@PostMapping("list/{tableId}")
@ -70,7 +69,6 @@ public class DataSetTableFieldController {
return fields;
}
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET)
@ApiOperation("查询表下属字段")
@PostMapping("listWithPermission/{tableId}")
@ -85,7 +83,6 @@ public class DataSetTableFieldController {
}
//管理权限可以列出所有字段
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET)
@ApiOperation("查询表下属字段")
@PostMapping("listForPermissionSeting/{tableId}")
@ -97,7 +94,6 @@ public class DataSetTableFieldController {
}
//管理权限可以列出所有字段
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET)
@ApiOperation("分组查询表下属字段")
@PostMapping("listByDQ/{tableId}")
@ -115,7 +111,6 @@ public class DataSetTableFieldController {
return datasetTableField4Type;
}
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET, value = "tableId", level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
@ApiOperation("批量更新")
@PostMapping("batchEdit")
@ -123,7 +118,6 @@ public class DataSetTableFieldController {
dataSetTableFieldsService.batchEdit(list);
}
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET, value = "tableId", level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
@ApiOperation("保存")
@PostMapping("save")
@ -141,7 +135,6 @@ public class DataSetTableFieldController {
return dataSetTableFieldsService.save(datasetTableField);
}
@RequiresPermissions("data:read")
@DePermissions(value = {
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_MANAGE, paramIndex = 1)
})

View File

@ -29,7 +29,6 @@ public class DatasetFunctionController {
@Resource
private DatasetFunctionService datasetFunctionService;
@RequiresPermissions("data:read")
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
@ApiOperation("查询")
@PostMapping("listByTableId/{tableId}")

View File

@ -86,7 +86,6 @@ public class DatasourceController {
datasourceService.updateDatasource(Datasource);
}
@RequiresPermissions("datasource:read")
@DePermission(type = DePermissionType.DATASOURCE, value = "id")
@ApiOperation("查询数据源下属所有表")
@PostMapping("/getTables")