From 9a08bffa998b3ffd5ba02563d7c89fec15d55a24 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Mon, 25 Dec 2023 14:49:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8E=A5=E5=8F=A3=E6=81=A2=E5=A4=8D=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E6=9D=83=E9=99=90=E6=A0=A1=E9=AA=8C=E7=9A=84=E7=BC=BA?= =?UTF-8?q?=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1033968 --user=王孝刚 【接口测试】无项目权限用户通过调用/api/api/definition/reduction接口恢复api https://www.tapd.cn/55049933/s/1447985 --- .../controller/definition/ApiDefinitionController.java | 1 + 1 file changed, 1 insertion(+) diff --git a/api-test/backend/src/main/java/io/metersphere/controller/definition/ApiDefinitionController.java b/api-test/backend/src/main/java/io/metersphere/controller/definition/ApiDefinitionController.java index d4b71ffd95..98c331679d 100644 --- a/api-test/backend/src/main/java/io/metersphere/controller/definition/ApiDefinitionController.java +++ b/api-test/backend/src/main/java/io/metersphere/controller/definition/ApiDefinitionController.java @@ -171,6 +171,7 @@ public class ApiDefinitionController { @PostMapping("/reduction") @MsAuditLog(module = OperLogModule.API_DEFINITION, type = OperLogConstants.RESTORE, beforeEvent = "#msClass.getLogDetails(#request.ids)", msClass = ApiDefinitionService.class) + @CheckOwner(resourceId = "#request.ids", resourceType = "api_definition") public void reduction(@RequestBody ApiBatchRequest request) { apiDefinitionService.reduction(request); }