Browse Source

优化token接口远程调用后的租户判断逻辑

test
smallchill 4 years ago
parent
commit
82adb25d75
  1. 2
      blade-auth/src/main/java/org/springblade/auth/utils/TokenUtil.java

2
blade-auth/src/main/java/org/springblade/auth/utils/TokenUtil.java

@ -154,7 +154,7 @@ public class TokenUtil {
* @return boolean
*/
public static boolean judgeTenant(Tenant tenant) {
if (tenant == null) {
if (tenant == null || tenant.getId() == null) {
throw new UserDeniedAuthorizationException(TokenUtil.USER_HAS_NO_TENANT);
}
if (StringUtil.equalsIgnoreCase(tenant.getTenantId(), BladeConstant.ADMIN_TENANT_ID)) {

Loading…
Cancel
Save