增加更严格的权限控制,对单条数据进行数据权限过滤
This commit is contained in:
@@ -70,8 +70,15 @@ public class EmpUserController extends BaseController {
|
|||||||
private RoleService roleService;
|
private RoleService roleService;
|
||||||
|
|
||||||
@ModelAttribute
|
@ModelAttribute
|
||||||
public EmpUser get(String userCode, boolean isNewRecord) {
|
public EmpUser get(String userCode, boolean isNewRecord, Boolean isAll, String ctrlPermi) {
|
||||||
return empUserService.get(userCode, isNewRecord);
|
EmpUser empUser = new EmpUser();
|
||||||
|
empUser.setUserCode(userCode);
|
||||||
|
empUser.setIsNewRecord(isNewRecord);
|
||||||
|
// 更严格的权限控制,对单条数据进行数据权限过滤(isAll 是一个开关,正常不需要添加)
|
||||||
|
if (!(isAll != null && isAll) || Global.isStrictMode()){
|
||||||
|
empUserService.addDataScopeFilter(empUser, ctrlPermi);
|
||||||
|
}
|
||||||
|
return empUserService.getAndValid(empUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresPermissions("sys:empUser:view")
|
@RequiresPermissions("sys:empUser:view")
|
||||||
|
|||||||
Reference in New Issue
Block a user