用户访问控制时校验数据权限,防止越权
This commit is contained in:
		| @@ -361,6 +361,7 @@ public class SysRoleServiceImpl implements ISysRoleService | ||||
|         for (Long roleId : roleIds) | ||||
|         { | ||||
|             checkRoleAllowed(new SysRole(roleId)); | ||||
|             checkRoleDataScope(roleId); | ||||
|             SysRole role = selectRoleById(roleId); | ||||
|             if (countUserRoleByRoleId(roleId) > 0) | ||||
|             { | ||||
|   | ||||
| @@ -482,6 +482,7 @@ public class SysUserServiceImpl implements ISysUserService | ||||
|         for (Long userId : userIds) | ||||
|         { | ||||
|             checkUserAllowed(new SysUser(userId)); | ||||
|             checkUserDataScope(userId); | ||||
|         } | ||||
|         // 删除用户与角色关联 | ||||
|         userRoleMapper.deleteUserRole(userIds); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user