提交 d43f6b0d authored 作者: taojinlong's avatar taojinlong

Merge branch 'main' of github.com:dataease/dataease into main

......@@ -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
......
......@@ -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
}
......@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论