From 6a2229d98c0a16089f5fb37ff872df7c8ab36775 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Wed, 23 Dec 2020 10:25:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8F=AA=E8=AF=BB=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E5=88=A0=E9=99=A4=E6=B5=8B=E8=AF=95=E6=8A=A5?= =?UTF-8?q?=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/metersphere/api/controller/APIReportController.java | 2 ++ .../performance/controller/PerformanceReportController.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/backend/src/main/java/io/metersphere/api/controller/APIReportController.java b/backend/src/main/java/io/metersphere/api/controller/APIReportController.java index 23af0d7f66..8ad8af9d20 100644 --- a/backend/src/main/java/io/metersphere/api/controller/APIReportController.java +++ b/backend/src/main/java/io/metersphere/api/controller/APIReportController.java @@ -60,6 +60,7 @@ public class APIReportController { } @PostMapping("/delete") + @RequiresRoles(value = {RoleConstants.TEST_MANAGER, RoleConstants.TEST_USER}, logical = Logical.OR) public void delete(@RequestBody DeleteAPIReportRequest request) { apiReportService.delete(request); } @@ -70,6 +71,7 @@ public class APIReportController { } @PostMapping("/batch/delete") + @RequiresRoles(value = {RoleConstants.TEST_MANAGER, RoleConstants.TEST_USER}, logical = Logical.OR) public void deleteAPIReportBatch(@RequestBody DeleteAPIReportRequest reportRequest) { apiReportService.deleteAPIReportBatch(reportRequest); } diff --git a/backend/src/main/java/io/metersphere/performance/controller/PerformanceReportController.java b/backend/src/main/java/io/metersphere/performance/controller/PerformanceReportController.java index dd07e05aaa..828cd04e5a 100644 --- a/backend/src/main/java/io/metersphere/performance/controller/PerformanceReportController.java +++ b/backend/src/main/java/io/metersphere/performance/controller/PerformanceReportController.java @@ -53,6 +53,7 @@ public class PerformanceReportController { } @PostMapping("/delete/{reportId}") + @RequiresRoles(value = {RoleConstants.TEST_MANAGER, RoleConstants.TEST_USER}, logical = Logical.OR) public void deleteReport(@PathVariable String reportId) { reportService.deleteReport(reportId); } @@ -130,6 +131,7 @@ public class PerformanceReportController { } @PostMapping("/batch/delete") + @RequiresRoles(value = {RoleConstants.TEST_MANAGER, RoleConstants.TEST_USER}, logical = Logical.OR) public void deleteReportBatch(@RequestBody DeleteReportRequest reportRequest) { reportService.deleteReportBatch(reportRequest); }