启用岗位角色权限权限后,给予操作提示
This commit is contained in:
@@ -165,8 +165,9 @@ public class EmpUserController extends BaseController {
|
||||
model.addAttribute("op", op);
|
||||
model.addAttribute("empUser", empUser);
|
||||
|
||||
// 获取控制权限类型
|
||||
// 获取控制权限类型、岗位角色权限参数
|
||||
model.addAttribute("ctrlPermi", Global.getConfig("user.adminCtrlPermi", "2"));
|
||||
model.addAttribute("postRolePermi", Global.getConfigToBoolean("user.postRolePermi", "false"));
|
||||
return "modules/sys/user/empUserForm";
|
||||
}
|
||||
|
||||
@@ -191,9 +192,11 @@ public class EmpUserController extends BaseController {
|
||||
if (StringUtils.inString(op, Global.OP_ADD, Global.OP_EDIT) && subject.isPermitted("sys:empUser:edit")){
|
||||
empUserService.save(empUser);
|
||||
}
|
||||
/*if (StringUtils.inString(op, Global.OP_AUTH) && Global.getConfigToBoolean("user.postRolePermi", "false")) {
|
||||
return renderResult(Global.FALSE, text("启用岗位角色后,将不允许单独对用户修改角色", empUser.getUserName()));
|
||||
} else */if (StringUtils.inString(op, Global.OP_ADD, Global.OP_AUTH) && subject.isPermitted("sys:empUser:authRole")){
|
||||
if (Global.getConfigToBoolean("user.postRolePermi", "false")) {
|
||||
if (StringUtils.inString(op, Global.OP_AUTH)) {
|
||||
return renderResult(Global.FALSE, text("启用岗位角色权限后,请在用户关联岗位中关联角色", empUser.getUserName()));
|
||||
}
|
||||
}else if (StringUtils.inString(op, Global.OP_ADD, Global.OP_AUTH) && subject.isPermitted("sys:empUser:authRole")){
|
||||
userService.saveAuth(empUser);
|
||||
}
|
||||
return renderResult(Global.TRUE, text("保存用户''{0}''成功", empUser.getUserName()));
|
||||
|
||||
@@ -202,6 +202,12 @@
|
||||
<% if(hasPermi('sys:empUser:authRole') && (op == 'add' || op == 'auth')) { %>
|
||||
<div class="form-unit">${text('分配角色')}</div>
|
||||
<div class="form-unit-wrap table-form">
|
||||
<% if(postRolePermi!) { %>
|
||||
<div class="alert alert-dismissible callout callout-info mb20" id="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" id="alertClose">×</button>
|
||||
<p><i class="icon fa fa-info"></i> 启用岗位角色权限权限后,角色不会保存,请在用户关联岗位中关联角色。</p>
|
||||
</div>
|
||||
<% } %>
|
||||
<table id="roleGrid"></table>
|
||||
<#form:hidden name="userRoleString"/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user