Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
c793eb41
Unverified
提交
c793eb41
authored
2月 28, 2022
作者:
Junjun
提交者:
GitHub
2月 28, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1844 from dataease/pr@v1.8@refactor_permission
refactor: 数据集视图权限
上级
5e794da1
82f4d11b
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
1 行增加
和
26 行删除
+1
-26
ChartViewController.java
...ava/io/dataease/controller/chart/ChartViewController.java
+1
-6
DataSetTableController.java
...o/dataease/controller/dataset/DataSetTableController.java
+0
-11
DataSetTableFieldController.java
...aease/controller/dataset/DataSetTableFieldController.java
+0
-7
DatasetFunctionController.java
...ataease/controller/dataset/DatasetFunctionController.java
+0
-1
DatasourceController.java
.../dataease/controller/datasource/DatasourceController.java
+0
-1
没有找到文件。
backend/src/main/java/io/dataease/controller/chart/ChartViewController.java
浏览文件 @
c793eb41
...
@@ -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}"
)
...
...
backend/src/main/java/io/dataease/controller/dataset/DataSetTableController.java
浏览文件 @
c793eb41
...
@@ -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}"
)
...
...
backend/src/main/java/io/dataease/controller/dataset/DataSetTableFieldController.java
浏览文件 @
c793eb41
...
@@ -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
)
})
})
...
...
backend/src/main/java/io/dataease/controller/dataset/DatasetFunctionController.java
浏览文件 @
c793eb41
...
@@ -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}"
)
...
...
backend/src/main/java/io/dataease/controller/datasource/DatasourceController.java
浏览文件 @
c793eb41
...
@@ -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
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论