Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
d43f6b0d
提交
d43f6b0d
authored
6月 07, 2021
作者:
taojinlong
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'main' of github.com:dataease/dataease into main
上级
c3e8ae4d
704d86ad
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
18 行增加
和
4 行删除
+18
-4
V5__auth.sql
backend/src/main/resources/db/migration/V5__auth.sql
+1
-1
permission.js
frontend/src/utils/permission.js
+8
-0
index.vue
frontend/src/views/system/datasource/index.vue
+9
-3
没有找到文件。
backend/src/main/resources/db/migration/V5__auth.sql
浏览文件 @
d43f6b0d
...
...
@@ -401,7 +401,7 @@ SELECT
sys_auth
.
auth_source
having
sum
(
sys_auth_detail
.
privilege_value
)
>
0
)
temp
;
select
GROUP_CONCAT
(
id
)
into
oTempAllIds
from
v_auth_model
where
v_auth_model
.
model_type
=
modelType
and
FIND_IN_SET
(
v_auth_model
.
id
,
GET_V_AUTH_MODEL_WITH_PARENT
(
oTempLeafIds
,
modelType
)
);
select
GROUP_CONCAT
(
id
)
into
oTempAllIds
from
(
select
GET_V_AUTH_MODEL_WITH_PARENT
(
oTempLeafIds
,
modelType
)
cids
)
t
,
v_auth_model
where
v_auth_model
.
model_type
=
modelType
and
FIND_IN_SET
(
v_auth_model
.
id
,
cids
);
RETURN
oTempAllIds
;
END
...
...
frontend/src/utils/permission.js
浏览文件 @
d43f6b0d
...
...
@@ -7,3 +7,11 @@ export function checkPermission(pers) {
})
return
hasPermission
}
export
function
hasDataPermission
(
pTarget
,
pSource
)
{
debugger
if
(
pSource
&&
pTarget
)
{
return
pSource
.
indexOf
(
pTarget
)
>
-
1
}
return
false
}
frontend/src/views/system/datasource/index.vue
浏览文件 @
d43f6b0d
...
...
@@ -92,7 +92,7 @@
import
LayoutContent
from
'@/components/business/LayoutContent'
import
ComplexTable
from
'@/components/business/complex-table'
import
{
checkPermission
}
from
'@/utils/permission'
import
{
checkPermission
,
hasDataPermission
}
from
'@/utils/permission'
import
{
formatCondition
}
from
'@/utils/index'
import
{
dsGrid
,
addDs
,
editDs
,
delDs
,
validateDs
}
from
'@/api/system/datasource'
...
...
@@ -124,10 +124,16 @@ export default {
buttons
:
[
{
label
:
this
.
$t
(
'commons.edit'
),
icon
:
'el-icon-edit'
,
type
:
'primary'
,
click
:
this
.
edit
,
show
:
checkPermission
([
'datasource:edit'
])
show
:
true
,
disabled
:
(
row
)
=>
{
return
!
hasDataPermission
(
'manage'
,
row
.
privileges
)
}
},
{
label
:
this
.
$t
(
'commons.delete'
),
icon
:
'el-icon-delete'
,
type
:
'danger'
,
click
:
this
.
_handleDelete
,
show
:
checkPermission
([
'datasource:del'
])
show
:
true
,
disabled
:
(
row
)
=>
{
return
!
hasDataPermission
(
'manage'
,
row
.
privileges
)
}
}
],
searchConfig
:
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论