From 7c84b6a68b91c401a31bccc22ab7871828d96290 Mon Sep 17 00:00:00 2001 From: Xiang Zheng Date: Tue, 15 Nov 2022 20:26:33 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=BA=94=E7=94=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E7=99=BB=E5=BD=95=E5=90=8E=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E8=A2=AB=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/java/io/dataease/auth/server/AuthServer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/io/dataease/auth/server/AuthServer.java b/backend/src/main/java/io/dataease/auth/server/AuthServer.java index e86731d06f..4455484c75 100644 --- a/backend/src/main/java/io/dataease/auth/server/AuthServer.java +++ b/backend/src/main/java/io/dataease/auth/server/AuthServer.java @@ -168,13 +168,14 @@ public class AuthServer implements AuthApi { String token = ServletUtils.getToken(); Long userId = JWTUtils.tokenInfoByToken(token).getUserId(); SysUserEntity user = authUserService.getUserById(userId); - CurrentUserDto currentUserDto = BeanUtils.copyBean(new CurrentUserDto(), user); + CurrentUserDto currentUserDto = BeanUtils.copyBean(new CurrentUserDto(), user, "password"); List currentRoleDtos = authUserService.roleInfos(user.getUserId()); List permissions = authUserService.permissions(user.getUserId()); currentUserDto.setRoles(currentRoleDtos); currentUserDto.setPermissions(permissions); return currentUserDto; } + userDto.setPassword(null); return userDto; }