fix: 数据源权限

This commit is contained in:
junjun 2022-03-02 18:30:34 +08:00
parent a0321b9139
commit 9f5820cccc

View File

@ -104,7 +104,6 @@ public class DataSetTableController {
return dataSetTableService.getWithPermission(id, null); return dataSetTableService.getWithPermission(id, null);
} }
@DePermission(type = DePermissionType.DATASOURCE, level = ResourceAuthLevel.DATASOURCE_LEVEL_USE, value = "dataSourceId")
@ApiOperation("查询原始字段") @ApiOperation("查询原始字段")
@PostMapping("getFields") @PostMapping("getFields")
public List<TableField> getFields(@RequestBody DatasetTable datasetTable) throws Exception { public List<TableField> getFields(@RequestBody DatasetTable datasetTable) throws Exception {
@ -125,14 +124,12 @@ public class DataSetTableController {
return dataSetTableService.getPreviewData(dataSetTableRequest, page, pageSize, null); return dataSetTableService.getPreviewData(dataSetTableRequest, page, pageSize, null);
} }
@DePermission(type = DePermissionType.DATASOURCE, level = ResourceAuthLevel.DATASOURCE_LEVEL_USE, value = "dataSourceId")
@ApiOperation("根据sql查询预览数据") @ApiOperation("根据sql查询预览数据")
@PostMapping("sqlPreview") @PostMapping("sqlPreview")
public Map<String, Object> getSQLPreview(@RequestBody DataSetTableRequest dataSetTableRequest) throws Exception { public Map<String, Object> getSQLPreview(@RequestBody DataSetTableRequest dataSetTableRequest) throws Exception {
return dataSetTableService.getSQLPreview(dataSetTableRequest); return dataSetTableService.getSQLPreview(dataSetTableRequest);
} }
@DePermission(type = DePermissionType.DATASOURCE, level = ResourceAuthLevel.DATASOURCE_LEVEL_USE, value = "dataSourceId")
@ApiOperation("预览自定义数据数据") @ApiOperation("预览自定义数据数据")
@PostMapping("customPreview") @PostMapping("customPreview")
public Map<String, Object> customPreview(@RequestBody DataSetTableRequest dataSetTableRequest) throws Exception { public Map<String, Object> customPreview(@RequestBody DataSetTableRequest dataSetTableRequest) throws Exception {