forked from github/dataease
fix: 自助数据集 api 权限校验
This commit is contained in:
parent
d7a52c28e6
commit
3f889ab62d
@ -26,17 +26,18 @@ public class DataSetTableUnionController {
|
|||||||
@Resource
|
@Resource
|
||||||
private DataSetTableUnionService dataSetTableUnionService;
|
private DataSetTableUnionService dataSetTableUnionService;
|
||||||
|
|
||||||
|
@DePermission(type = DePermissionType.DATASET, value = "sourceTableId", level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
|
||||||
@ApiOperation("保存")
|
@ApiOperation("保存")
|
||||||
@PostMapping("save")
|
@PostMapping("save")
|
||||||
public DatasetTableUnion save(@RequestBody DatasetTableUnion datasetTableUnion) {
|
public DatasetTableUnion save(@RequestBody DatasetTableUnion datasetTableUnion) {
|
||||||
return dataSetTableUnionService.save(datasetTableUnion);
|
return dataSetTableUnionService.save(datasetTableUnion);
|
||||||
}
|
}
|
||||||
|
|
||||||
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
|
@DePermission(type = DePermissionType.DATASET, value = "sourceTableId", level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
|
||||||
@ApiOperation("删除")
|
@ApiOperation("删除")
|
||||||
@PostMapping("delete/{id}")
|
@PostMapping("delete")
|
||||||
public void delete(@PathVariable String id) {
|
public void delete(@RequestBody DatasetTableUnion datasetTableUnion) {
|
||||||
dataSetTableUnionService.delete(id);
|
dataSetTableUnionService.delete(datasetTableUnion.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@DePermission(type = DePermissionType.DATASET)
|
@DePermission(type = DePermissionType.DATASET)
|
||||||
|
@ -287,7 +287,7 @@ export default {
|
|||||||
cancelButtonText: this.$t('dataset.cancel'),
|
cancelButtonText: this.$t('dataset.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
post('dataset/union/delete/' + item.id, {}).then(response => {
|
post('dataset/union/delete', item).then(response => {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: this.$t('dataset.delete_success'),
|
message: this.$t('dataset.delete_success'),
|
||||||
|
Loading…
Reference in New Issue
Block a user