提交 6332f900 编写于 作者: lengyu's avatar lengyu

新增SAAS4模式下动态代理组织标识权限换算

上级 465910e8
......@@ -84,7 +84,12 @@ public class AuthorizationTokenFilter extends OncePerRequestFilter {
if(StringUtils.isEmpty(requestOrgId)||StringUtils.isEmpty(requestSystemId)){
throw new RuntimeException("系统标识或组织标识不能为空");
}
UserDetails userDetails = this.userDetailsService.loadUserByUsername(requestSystemId,requestOrgId,username);
final String requestProxyOrgId = request.getHeader("srfdynaorgid");
if(!(StringUtils.isEmpty(requestProxyOrgId)||"undefined".equals(requestProxyOrgId))){
UserDetails userDetails = this.userDetailsService.loadUserByUsername(requestSystemId,String.format("%1$s|%2$s",requestOrgId,requestProxyOrgId),username);
}else{
UserDetails userDetails = this.userDetailsService.loadUserByUsername(requestSystemId,requestOrgId,username);
}
<#else>
UserDetails userDetails = this.userDetailsService.loadUserByUsername(username);
</#if>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册