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); }