From fe4220897bafcf1980635246170a19c98056d11d Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Wed, 23 Dec 2020 10:20:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8F=AA=E8=AF=BB=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=9D=83=E9=99=90=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../metersphere/api/controller/ApiDefinitionController.java | 5 +++++ backend/src/main/java/io/metersphere/xpack | 2 +- frontend/src/business/components/xpack | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/controller/ApiDefinitionController.java b/backend/src/main/java/io/metersphere/api/controller/ApiDefinitionController.java index 6f8fddfb7d..23a7a8c2b5 100644 --- a/backend/src/main/java/io/metersphere/api/controller/ApiDefinitionController.java +++ b/backend/src/main/java/io/metersphere/api/controller/ApiDefinitionController.java @@ -39,26 +39,31 @@ public class ApiDefinitionController { } @PostMapping(value = "/create", consumes = {"multipart/form-data"}) + @RequiresRoles(value = {RoleConstants.TEST_MANAGER, RoleConstants.TEST_USER}, logical = Logical.OR) public void create(@RequestPart("request") SaveApiDefinitionRequest request, @RequestPart(value = "files") List bodyFiles) { apiDefinitionService.create(request, bodyFiles); } @PostMapping(value = "/update", consumes = {"multipart/form-data"}) + @RequiresRoles(value = {RoleConstants.TEST_MANAGER, RoleConstants.TEST_USER}, logical = Logical.OR) public void update(@RequestPart("request") SaveApiDefinitionRequest request, @RequestPart(value = "files") List bodyFiles) { apiDefinitionService.update(request, bodyFiles); } @GetMapping("/delete/{id}") + @RequiresRoles(value = {RoleConstants.TEST_MANAGER, RoleConstants.TEST_USER}, logical = Logical.OR) public void delete(@PathVariable String id) { apiDefinitionService.delete(id); } @PostMapping("/deleteBatch") + @RequiresRoles(value = {RoleConstants.TEST_MANAGER, RoleConstants.TEST_USER}, logical = Logical.OR) public void deleteBatch(@RequestBody List ids) { apiDefinitionService.deleteBatch(ids); } @PostMapping("/removeToGc") + @RequiresRoles(value = {RoleConstants.TEST_MANAGER, RoleConstants.TEST_USER}, logical = Logical.OR) public void removeToGc(@RequestBody List ids) { apiDefinitionService.removeToGc(ids); } diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index bb494fc68a..9f4a9bbf46 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit bb494fc68a2367359c9048fa7250c7618de4afb6 +Subproject commit 9f4a9bbf46fc1333dbcccea21f83e27e3ec10b1f diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack index a22a3005d9..010ad7a5f0 160000 --- a/frontend/src/business/components/xpack +++ b/frontend/src/business/components/xpack @@ -1 +1 @@ -Subproject commit a22a3005d9bd254793fcf634d72539cbdf31be3a +Subproject commit 010ad7a5f072a5e9d368c756a2473bbd20781433