From 113f99bf73495aefe7fde5dad5e1163f648118fe Mon Sep 17 00:00:00 2001 From: smallchill Date: Thu, 20 Aug 2020 10:38:35 +0800 Subject: [PATCH] =?UTF-8?q?:tada:=202.7.2.RELEASE=20=E9=9B=86=E6=88=90Just?= =?UTF-8?q?Auth=E6=94=AF=E6=8C=81=E7=AC=AC=E4=B8=89=E6=96=B9=E7=99=BB?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/springblade/system/controller/MenuController.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/blade-service/blade-system/src/main/java/org/springblade/system/controller/MenuController.java b/blade-service/blade-system/src/main/java/org/springblade/system/controller/MenuController.java index 237e594..aa19580 100644 --- a/blade-service/blade-system/src/main/java/org/springblade/system/controller/MenuController.java +++ b/blade-service/blade-system/src/main/java/org/springblade/system/controller/MenuController.java @@ -162,6 +162,9 @@ public class MenuController extends BladeController { @ApiOperationSupport(order = 10) @ApiOperation(value = "菜单的角色权限") public R> authRoutes(BladeUser user) { + if (Func.isEmpty(user) || user.getUserId() == 0L) { + return null; + } return R.data(menuService.authRoutes(user)); }