From 0b852faf00776601e7ecd6c4d57f4f75ce70caff Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期六, 29 一月 2022 09:23:11 +0800 Subject: [PATCH] Merge remote-tracking branch 'ruoyi-vue/master' into dev --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java index c6d887c..4fc742a 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java @@ -95,6 +95,7 @@ @PutMapping public AjaxResult<Void> edit(@Validated @RequestBody SysRole role) { roleService.checkRoleAllowed(role); + roleService.checkRoleDataScope(role.getRoleId()); if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role))) { return AjaxResult.error("淇敼瑙掕壊'" + role.getRoleName() + "'澶辫触锛岃鑹插悕绉板凡瀛樺湪"); } else if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role))) { @@ -123,6 +124,7 @@ @PutMapping("/dataScope") public AjaxResult<Void> dataScope(@RequestBody SysRole role) { roleService.checkRoleAllowed(role); + roleService.checkRoleDataScope(role.getRoleId()); return toAjax(roleService.authDataScope(role)); } @@ -135,6 +137,7 @@ @PutMapping("/changeStatus") public AjaxResult<Void> changeStatus(@RequestBody SysRole role) { roleService.checkRoleAllowed(role); + roleService.checkRoleDataScope(role.getRoleId()); return toAjax(roleService.updateRoleStatus(role)); } @@ -217,6 +220,7 @@ @Log(title = "瑙掕壊绠$悊", businessType = BusinessType.GRANT) @PutMapping("/authUser/selectAll") public AjaxResult<Void> selectAuthUserAll(Long roleId, Long[] userIds) { + roleService.checkRoleDataScope(roleId); return toAjax(roleService.insertAuthUsers(roleId, userIds)); } } -- Gitblit v1.9.3