From 8b26816ce295460763bfd027e8d0a66df0ce70c6 Mon Sep 17 00:00:00 2001 From: CD <1103614279@qq.com> Date: Mon, 10 Oct 2022 18:05:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E6=95=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extRepo/controller/ExtRepoFolderController.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/controller/ExtRepoFolderController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/controller/ExtRepoFolderController.java index 0e04edc29..7ad386fa8 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/controller/ExtRepoFolderController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/extRepo/controller/ExtRepoFolderController.java @@ -102,31 +102,30 @@ public class ExtRepoFolderController extends JeroController isAllowSiblingFolder(@RequestParam(name="id",required=true) String id, - @RequestParam(name = "cut", defaultValue = "cn") String cut, + public Result isAllowSiblingFolder(@Validated @RequestBody ExtRepoFolder extRepoFolder, HttpSession session) { Result result = new Result(); session.setAttribute("haveSuperiorManageAuth", false); - ExtRepoFolder folder = extRepoFolderService.queryById(id); + ExtRepoFolder folder = extRepoFolderService.queryById(extRepoFolder.getId()); extRepoFolderService.haveSuperiorManageAuth(folder.getSupFolder(),session); //上层是否有权限 boolean boo = (Boolean)session.getAttribute("haveSuperiorManageAuth"); - if (boo || extRepoFolderService.haveManageAuth(id)) { + if (boo || extRepoFolderService.haveManageAuth(extRepoFolder.getId())) { if (!boo) { - if (CutEnum.CN.getValue().equals(cut)) { + if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) { return result.error500("无法创建同级文件夹!请联系管理员!"); } else { return result.error500("Unable to create a sibling folder ! Please Contact your administrator !"); } } } else { - if (CutEnum.CN.getValue().equals(cut)) { + if (CutEnum.CN.getValue().equals(extRepoFolder.getCut())) { return result.error500("没有权限!"); } else { return result.error500("You do not have permission !");