疯狂的狮子li
2021-10-15 6684812014a0f48d0f3ddd9a6612f7c89dc18e8e
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
@@ -104,6 +104,7 @@
    @GetMapping(value = { "/", "/{userId}" })
    public AjaxResult getInfo(@PathVariable(value = "userId", required = false) Long userId)
    {
      userService.checkUserDataScope(userId);
        Map<String, Object> ajax = new HashMap<>();
        List<SysRole> roles = roleService.selectRoleAll();
        ajax.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));