forked from github/dataease
Merge pull request #4414 from dataease/pr@dev@refactor_custom-check
refactor(仪表板): 从模板新建的过滤组件在没有重新关联数据集前忽略权限检查,防止报无权限问题
This commit is contained in:
commit
3831c40d12
@ -509,6 +509,9 @@ public class PanelGroupService {
|
||||
if (dynamicDataMap == null) {
|
||||
DataEaseException.throwException("Please use the template after v1.9");
|
||||
}
|
||||
//custom组件替换.tableId 和 parentFieldId 追加识别标识
|
||||
templateData = templateData.replaceAll("\"tableId\":\"", "\"tableId\":\"no_auth");
|
||||
templateData = templateData.replaceAll("\"fieldsParent\":\\{\"id\":\"", "\"fieldsParent\":\\{\"id\":\"no_auth");
|
||||
|
||||
List<PanelViewInsertDTO> panelViews = new ArrayList<>();
|
||||
List<PanelGroupExtendDataDTO> viewsData = new ArrayList<>();
|
||||
|
@ -138,6 +138,14 @@ export function fieldList(id, showLoading = true) {
|
||||
}
|
||||
|
||||
export function fieldListWithPermission(id, showLoading = true) {
|
||||
//初始模板中的过滤组件无需走后台
|
||||
if (id.indexOf('no_auth') > -1) {
|
||||
return new Promise(function(resolve) {
|
||||
resolve({
|
||||
data: []
|
||||
})
|
||||
})
|
||||
}
|
||||
return request({
|
||||
url: '/dataset/field/listWithPermission/' + id,
|
||||
loading: showLoading,
|
||||
|
Loading…
Reference in New Issue
Block a user