From e9cc8e2c250ab4c540e9d66b913b98d68f264e81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=98=89=E8=B1=AA?= <42510293+ziyujiahao@users.noreply.github.com> Date: Wed, 19 Jan 2022 19:05:43 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"refactor:=20=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E6=97=A0=E7=94=A8=E4=BB=A3=E7=A0=81"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/dataease/mobile/service/DirService.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/backend/src/main/java/io/dataease/mobile/service/DirService.java b/backend/src/main/java/io/dataease/mobile/service/DirService.java index 79abaa2c7b..8e69473f2a 100644 --- a/backend/src/main/java/io/dataease/mobile/service/DirService.java +++ b/backend/src/main/java/io/dataease/mobile/service/DirService.java @@ -40,6 +40,7 @@ public class DirService { } public List query(DirRequest request) { +// CurrentUserDto user = AuthUtils.getUser(); String userId = String.valueOf(AuthUtils.getUser().getUserId()); List panelEntities = new ArrayList<>(); if (StringUtils.isNotBlank(request.getName())) { @@ -57,6 +58,17 @@ public class DirService { return dirItemDTO; }).collect(Collectors.toList()); return dtos; + +// if (user.getUserId() == 1 && StringUtils.equals("admin", user.getUsername())) { +// return dtos; +// } +// List permissions = proxy().permissions(); +// return dtos.stream().filter( +// dto -> permissions.stream().anyMatch( +// permission -> StringUtils.equals(permission, dto.getId()) +// ) +// ).collect(Collectors.toList()); + } public DirService proxy() {