From 58b4df7bb53b499c09cd0aa97441c3a1d2c355db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Fri, 8 Sep 2023 12:27:36 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E9=83=A8?= =?UTF-8?q?=E5=88=86=E4=BD=BF=E7=94=A8=E8=80=85=E4=B9=B1=E8=AE=BE=E6=9D=83?= =?UTF-8?q?=E9=99=90=E5=AF=BC=E8=87=B4=E6=97=A0=E6=B3=95=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=9D=83=E9=99=90=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dromara/system/controller/system/SysUserController.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysUserController.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysUserController.java index fdefe422..628060ae 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysUserController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysUserController.java @@ -112,6 +112,9 @@ public class SysUserController extends BaseController { TenantHelper.clearDynamic(); } SysUserVo user = userService.selectUserById(loginUser.getUserId()); + if (ObjectUtil.isNull(user)) { + return R.fail("没有权限访问用户数据!"); + } userInfoVo.setUser(user); userInfoVo.setPermissions(loginUser.getMenuPermission()); userInfoVo.setRoles(loginUser.getRolePermission());