|
|
@@ -44,7 +44,6 @@ import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
|
|
|
import org.springframework.ui.ModelMap;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
|
|
|
-import javax.servlet.ServletException;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.io.*;
|
|
|
@@ -306,6 +305,9 @@ public class SSOInterceptor extends AbstractSSOInterceptor {
|
|
|
// 从其他应用切换了企业的情况
|
|
|
if (token.getData() != null) {
|
|
|
UserAccount tokenUser = FlexJsonUtils.fromJson(token.getData(), UserAccount.class);
|
|
|
+ if (StringUtils.isEmpty(tokenUser.getBusinessCode()) || StringUtils.isEmpty(tokenUser.getSpaceUU())) {
|
|
|
+ throw new IllegalAccessError("个人用户无法使用B2B商务平台");
|
|
|
+ }
|
|
|
// 如果是从个人用户切换或者当前企业切换
|
|
|
boolean flag = null == user.getEnterprise() || !user.getEnterprise().getUu().equals(tokenUser.getSpaceUU());
|
|
|
if (!StringUtils.isEmpty(tokenUser.getSpaceUU()) && flag) {
|