forked from github/dataease
Merge branch 'main' of github.com:dataease/dataease into main
This commit is contained in:
commit
d43f6b0d4a
@ -401,7 +401,7 @@ SELECT
|
|||||||
sys_auth.auth_source
|
sys_auth.auth_source
|
||||||
having sum( sys_auth_detail.privilege_value )> 0) temp;
|
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;
|
RETURN oTempAllIds;
|
||||||
END
|
END
|
||||||
|
@ -7,3 +7,11 @@ export function checkPermission(pers) {
|
|||||||
})
|
})
|
||||||
return hasPermission
|
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 LayoutContent from '@/components/business/LayoutContent'
|
||||||
import ComplexTable from '@/components/business/complex-table'
|
import ComplexTable from '@/components/business/complex-table'
|
||||||
import { checkPermission } from '@/utils/permission'
|
import { checkPermission, hasDataPermission } from '@/utils/permission'
|
||||||
import { formatCondition } from '@/utils/index'
|
import { formatCondition } from '@/utils/index'
|
||||||
import { dsGrid, addDs, editDs, delDs, validateDs } from '@/api/system/datasource'
|
import { dsGrid, addDs, editDs, delDs, validateDs } from '@/api/system/datasource'
|
||||||
|
|
||||||
@ -124,10 +124,16 @@ export default {
|
|||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
label: this.$t('commons.edit'), icon: 'el-icon-edit', type: 'primary', click: this.edit,
|
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,
|
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: {
|
searchConfig: {
|
||||||
|
Loading…
Reference in New Issue
Block a user