|
|
|
@@ -16,7 +16,7 @@ import com.ruoyi.system.service.ISysRoleService; |
|
|
|
|
|
|
|
/** |
|
|
|
* 用户权限处理 |
|
|
|
* |
|
|
|
* |
|
|
|
* @author ruoyi |
|
|
|
*/ |
|
|
|
@Service |
|
|
|
@@ -30,7 +30,7 @@ public class SysPermissionServiceImpl implements ISysPermissionService |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取角色数据权限 |
|
|
|
* |
|
|
|
* |
|
|
|
* @param userId 用户Id |
|
|
|
* @return 角色权限信息 |
|
|
|
*/ |
|
|
|
@@ -39,7 +39,7 @@ public class SysPermissionServiceImpl implements ISysPermissionService |
|
|
|
{ |
|
|
|
Set<String> roles = new HashSet<String>(); |
|
|
|
// 管理员拥有所有权限 |
|
|
|
if (roleService.checkIsAdmin()) |
|
|
|
if (roleService.checkIsAdmin(user.getUserId())) |
|
|
|
{ |
|
|
|
roles.add(Constant.Admin); |
|
|
|
} |
|
|
|
@@ -52,7 +52,7 @@ public class SysPermissionServiceImpl implements ISysPermissionService |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取菜单数据权限 |
|
|
|
* |
|
|
|
* |
|
|
|
* @param userId 用户Id |
|
|
|
* @return 菜单权限信息 |
|
|
|
*/ |
|
|
|
@@ -61,7 +61,7 @@ public class SysPermissionServiceImpl implements ISysPermissionService |
|
|
|
{ |
|
|
|
Set<String> perms = new HashSet<String>(); |
|
|
|
// 管理员拥有所有权限 |
|
|
|
if (roleService.checkIsAdmin()) |
|
|
|
if (roleService.checkIsAdmin(user.getUserId())) |
|
|
|
{ |
|
|
|
perms.add("*:*:*"); |
|
|
|
} |
|
|
|
|