角色数据权限范围,支持扩展自定义的数据权限,并相关权限功能优化改进;新增本部门数据、本公司数据、本部门和本公司数据的权限范围
This commit is contained in:
@@ -24,7 +24,7 @@ jdbc:
|
||||
minIdle: 3
|
||||
# 最大连接数
|
||||
maxActive: 20
|
||||
|
||||
|
||||
# 获取连接等待超时时间,单位毫秒(4.0.6+)
|
||||
maxWait: 60000
|
||||
|
||||
@@ -81,13 +81,13 @@ adminPath: /a
|
||||
# 前端基础路径
|
||||
frontPath: /f
|
||||
|
||||
# 分页配置
|
||||
# 分页相关
|
||||
page:
|
||||
|
||||
# 分页默认大小
|
||||
pageSize: 20
|
||||
|
||||
# 用户相关参数
|
||||
# 用户相关
|
||||
user:
|
||||
|
||||
# 指定超级管理员编号(研发团队使用的账号)
|
||||
@@ -143,7 +143,7 @@ user:
|
||||
expandLevel: -1,
|
||||
remarks: ""
|
||||
}]
|
||||
|
||||
|
||||
# 多租户模式(SAAS模式)(专业版)
|
||||
useCorpModel: false
|
||||
|
||||
@@ -153,7 +153,47 @@ user:
|
||||
registerUser:
|
||||
enabled: false
|
||||
userTypes: 0, 1
|
||||
|
||||
|
||||
# 角色管理
|
||||
role:
|
||||
# 扩展数据权限定义:3:本部门;4:本公司;5:本部门和本公司
|
||||
# 如果 ctrlTypeClass 为 NONE,则代表是不控制该类型权限
|
||||
extendDataScopes: >
|
||||
{
|
||||
3: {
|
||||
Office: {
|
||||
ctrlTypeClass: "com.jeesite.modules.sys.entity.Office",
|
||||
ctrlDataAttrName: "currentUser.refObj.office.officeCode",
|
||||
ctrlDataParentCodesAttrName: "currentUser.refObj.office.parentCodes"
|
||||
},
|
||||
Company: {
|
||||
ctrlTypeClass: "NONE"
|
||||
}
|
||||
},
|
||||
4: {
|
||||
Office: {
|
||||
ctrlTypeClass: "NONE"
|
||||
},
|
||||
Company: {
|
||||
ctrlTypeClass: "com.jeesite.modules.sys.entity.Company",
|
||||
ctrlDataAttrName: "currentUser.refObj.company.companyCode",
|
||||
ctrlDataParentCodesAttrName: "currentUser.refObj.company.parentCodes"
|
||||
}
|
||||
},
|
||||
5: {
|
||||
Office: {
|
||||
ctrlTypeClass: "com.jeesite.modules.sys.entity.Office",
|
||||
ctrlDataAttrName: "currentUser.refObj.office.officeCode",
|
||||
ctrlDataParentCodesAttrName: "currentUser.refObj.office.parentCodes"
|
||||
},
|
||||
Company: {
|
||||
ctrlTypeClass: "com.jeesite.modules.sys.entity.Company",
|
||||
ctrlDataAttrName: "currentUser.refObj.company.companyCode",
|
||||
ctrlDataParentCodesAttrName: "currentUser.refObj.company.parentCodes"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# 菜单管理
|
||||
menu:
|
||||
# 根据模块状态去更新相连的菜单状态(仅作为微服务时设为false)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class="col-sm-8">
|
||||
<#form:treeselect id="parent" title="${text('上级公司')}"
|
||||
path="parent.id" labelPath="parent.companyName"
|
||||
url="${ctx}/sys/company/treeData?excludeCode=${company.id}"
|
||||
url="${ctx}/sys/company/treeData?excludeCode=${company.id}&ctrlPermi=2"
|
||||
class="" allowClear="true" canSelectRoot="true" canSelectParent="true"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<div class="box-body">
|
||||
<#form:form id="searchForm" model="${company}" action="${ctx}/sys/company/listData" method="post" class="form-inline hide"
|
||||
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
|
||||
<#form:hidden name="ctrlPermi" value="2"/>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('公司代码')}:</label>
|
||||
<div class="control-inline">
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class="col-sm-8">
|
||||
<#form:treeselect id="parent" title="${text('上级机构')}"
|
||||
path="parent.id" labelPath="parent.officeName"
|
||||
url="${ctx}/sys/office/treeData?excludeCode=${office.id}"
|
||||
url="${ctx}/sys/office/treeData?excludeCode=${office.id}&ctrlPermi=2"
|
||||
class="" allowClear="true" canSelectRoot="true" canSelectParent="true"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<div class="box-body">
|
||||
<#form:form id="searchForm" model="${office}" action="${ctx}/sys/office/listData" method="post" class="form-inline hide"
|
||||
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
|
||||
<#form:hidden name="ctrlPermi" value="2"/>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('机构代码')}:</label>
|
||||
<div class="control-inline">
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<div class="col-sm-8">
|
||||
<#form:treeselect id="office" title="${text('机构选择')}"
|
||||
path="employee.office.officeCode" labelPath="employee.office.officeName"
|
||||
url="${ctx}/sys/office/treeData" class="required" allowClear="false"/>
|
||||
url="${ctx}/sys/office/treeData?ctrlPermi=2" class="required" allowClear="false"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -36,7 +36,7 @@
|
||||
<div class="col-sm-8">
|
||||
<#form:treeselect id="company" title="${text('公司选择')}"
|
||||
path="employee.company.companyCode" labelPath="employee.company.companyName"
|
||||
url="${ctx}/sys/company/treeData" btnClass="" allowClear="true"/>
|
||||
url="${ctx}/sys/company/treeData?ctrlPermi=2" btnClass="" allowClear="true"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<div class="box-body">
|
||||
<#form:form id="searchForm" model="${empUser}" action="${ctx}/sys/empUser/listData" method="post" class="form-inline "
|
||||
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
|
||||
<#form:hidden name="ctrlPermi" value="2"/>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('账号')}:</label>
|
||||
<div class="control-inline">
|
||||
@@ -66,7 +67,7 @@
|
||||
<div class="control-inline width-90">
|
||||
<#form:treeselect id="office" title="${text('机构选择')}"
|
||||
path="employee.office.officeCode" labelPath="employee.office.officeName"
|
||||
url="${ctx}/sys/office/treeData" btnClass="btn-sm" allowClear="true" canSelectParent="true"/>
|
||||
url="${ctx}/sys/office/treeData?ctrlPermi=2" btnClass="btn-sm" allowClear="true" canSelectParent="true"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -74,7 +75,7 @@
|
||||
<div class="control-inline width-90">
|
||||
<#form:treeselect id="company" title="${text('公司选择')}"
|
||||
path="employee.company.companyCode" labelPath="employee.company.companyName"
|
||||
url="${ctx}/sys/company/treeData" btnClass="btn-sm" allowClear="true" canSelectParent="true"/>
|
||||
url="${ctx}/sys/company/treeData?ctrlPermi=2" btnClass="btn-sm" allowClear="true" canSelectParent="true"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<#form:form id="searchForm" action="${ctx}/sys/empUser/listData" method="post" class="form-inline "
|
||||
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
|
||||
<#form:hidden name="status" value="${isNotBlank(empUser.status) ? empUser.status : '0'}"/>
|
||||
<#form:hidden name="isAll" value="${parameter.isAll}"/>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('账号')}:</label>
|
||||
<div class="control-inline">
|
||||
@@ -102,7 +103,7 @@ selectNum = 0, dataGrid = $('#dataGrid').dataGrid({
|
||||
$('.tags-input').height($('.ui-jqgrid').height() - 10);
|
||||
return height;
|
||||
},
|
||||
showCheckbox: ${checkbox! == 'true'},
|
||||
showCheckbox: '${parameter.checkbox}' == 'true',
|
||||
multiboxonly: false, // 单击复选框时再多选
|
||||
ajaxSuccess: function(data){
|
||||
$.each(selectData, function(key, value){
|
||||
@@ -111,7 +112,7 @@ selectNum = 0, dataGrid = $('#dataGrid').dataGrid({
|
||||
initSelectTag();
|
||||
},
|
||||
onSelectRow: function(id, isSelect, event){
|
||||
if (${checkbox! == 'true'}){
|
||||
if ('${parameter.checkbox}' == 'true'){
|
||||
if(isSelect){
|
||||
selectData[id] = JSON.parse(dataGrid.dataGrid('getRowData', id).rowData);
|
||||
}else{
|
||||
@@ -124,7 +125,7 @@ selectNum = 0, dataGrid = $('#dataGrid').dataGrid({
|
||||
initSelectTag();
|
||||
},
|
||||
onSelectAll: function(ids, isSelect){
|
||||
if (${checkbox! == 'true'}){
|
||||
if ('${parameter.checkbox}' == 'true'){
|
||||
for (var i=0; i<ids.length; i++){
|
||||
if(isSelect){
|
||||
selectData[ids[i]] = JSON.parse(dataGrid.dataGrid('getRowData', ids[i]).rowData);
|
||||
@@ -136,7 +137,7 @@ selectNum = 0, dataGrid = $('#dataGrid').dataGrid({
|
||||
initSelectTag();
|
||||
},
|
||||
ondblClickRow: function(id, rownum, colnum, event){
|
||||
if (${checkbox! != 'true'}){
|
||||
if ('${parameter.checkbox}' != 'true'){
|
||||
js.layer.$('#' + window.name).closest('.layui-layer')
|
||||
.find(".layui-layer-btn0").trigger("click");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user