forked from github/dataease
fix(应用): 修复应用登录后密码被返回
This commit is contained in:
parent
fc2469c45d
commit
7c84b6a68b
@ -168,13 +168,14 @@ public class AuthServer implements AuthApi {
|
|||||||
String token = ServletUtils.getToken();
|
String token = ServletUtils.getToken();
|
||||||
Long userId = JWTUtils.tokenInfoByToken(token).getUserId();
|
Long userId = JWTUtils.tokenInfoByToken(token).getUserId();
|
||||||
SysUserEntity user = authUserService.getUserById(userId);
|
SysUserEntity user = authUserService.getUserById(userId);
|
||||||
CurrentUserDto currentUserDto = BeanUtils.copyBean(new CurrentUserDto(), user);
|
CurrentUserDto currentUserDto = BeanUtils.copyBean(new CurrentUserDto(), user, "password");
|
||||||
List<CurrentRoleDto> currentRoleDtos = authUserService.roleInfos(user.getUserId());
|
List<CurrentRoleDto> currentRoleDtos = authUserService.roleInfos(user.getUserId());
|
||||||
List<String> permissions = authUserService.permissions(user.getUserId());
|
List<String> permissions = authUserService.permissions(user.getUserId());
|
||||||
currentUserDto.setRoles(currentRoleDtos);
|
currentUserDto.setRoles(currentRoleDtos);
|
||||||
currentUserDto.setPermissions(permissions);
|
currentUserDto.setPermissions(permissions);
|
||||||
return currentUserDto;
|
return currentUserDto;
|
||||||
}
|
}
|
||||||
|
userDto.setPassword(null);
|
||||||
return userDto;
|
return userDto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user