From 82adb25d7510cd34a06c055584e3cf56ffcf6828 Mon Sep 17 00:00:00 2001 From: smallchill Date: Wed, 10 Feb 2021 22:09:25 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E4=BC=98=E5=8C=96token=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=BF=9C=E7=A8=8B=E8=B0=83=E7=94=A8=E5=90=8E=E7=9A=84?= =?UTF-8?q?=E7=A7=9F=E6=88=B7=E5=88=A4=E6=96=AD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/org/springblade/auth/utils/TokenUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blade-auth/src/main/java/org/springblade/auth/utils/TokenUtil.java b/blade-auth/src/main/java/org/springblade/auth/utils/TokenUtil.java index b3ff6c13..febe8066 100644 --- a/blade-auth/src/main/java/org/springblade/auth/utils/TokenUtil.java +++ b/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)) {