From 6d09d0cbebef4dc9dc3bfd07e19353f0f9f40d66 Mon Sep 17 00:00:00 2001 From: qi_liang Date: Mon, 9 Mar 2020 00:13:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=98=E9=87=8F=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/lq/code/interceptor/shiro/ShiroRealm.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/lq/code/interceptor/shiro/ShiroRealm.java b/src/main/java/com/lq/code/interceptor/shiro/ShiroRealm.java index b415b08..50e5276 100755 --- a/src/main/java/com/lq/code/interceptor/shiro/ShiroRealm.java +++ b/src/main/java/com/lq/code/interceptor/shiro/ShiroRealm.java @@ -49,15 +49,15 @@ public class ShiroRealm extends AuthorizingRealm { SysRole sysRole = sysRoleIterator.next(); String sysRoleName = sysRole.getRoleName(); info.addRole(sysRoleName); - List list = null; + List permissionVos = null; //admin默认获取全部权限 if (StringUtil.isNotNull(sysRoleName)&& Constant.ROLE_ADMIN.equals(sysRoleName)){ - list = sysRoleResourcePermissionService.findAllPermissonVo(); + permissionVos = sysRoleResourcePermissionService.findAllPermissonVo(); }else { - list = sysRoleResourcePermissionService.findByRoleId(sysRole.getId()); + permissionVos = sysRoleResourcePermissionService.findByRoleId(sysRole.getId()); } //每个角色拥有的权限 - for (PermissionVo vo:list){ + for (PermissionVo vo:permissionVos){ info.addStringPermission(vo.getMenuUrl()+Constant.PERSSION_MARK+vo.getPermissionName()); } if (Constant.ROLE_ADMIN.equals(sysRoleName)){