Skip to content

Commit

Permalink
【功能修复】报表:修复 JmReportTokenServiceImpl 在 jdk17 和 jdk8 存在差异的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
YunaiV committed Nov 2, 2024
1 parent bcc713f commit 11fd5c3
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ private LoginUser buildLoginUserByToken(String token) {

@Override
public String[] getRoles(String token) {
// 设置租户上下文。原因是:/jmreport/** 纯前端地址,不会走 buildLoginUserByToken 逻辑
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
if (loginUser == null) {
return null;
}
TenantContextHolder.setTenantId(loginUser.getTenantId());

// 参见文档 https://help.jeecg.com/jimureport/prodSafe.html 文档
// 适配:如果是本系统的管理员,则转换成 jimu 报表的管理员
Long userId = SecurityFrameworkUtils.getLoginUserId();
Expand Down

0 comments on commit 11fd5c3

Please sign in to comment.