From 69929b34ee74420a0e36d2d10428f9f1bea05622 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Mon, 29 Apr 2024 19:06:14 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95=E9=83=A8=E5=88=86=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=8A=A0=E4=B8=8Acheckowner?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/controller/PerformanceTestController.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/performance-test/backend/src/main/java/io/metersphere/controller/PerformanceTestController.java b/performance-test/backend/src/main/java/io/metersphere/controller/PerformanceTestController.java index 5dda70095e..02f0524975 100644 --- a/performance-test/backend/src/main/java/io/metersphere/controller/PerformanceTestController.java +++ b/performance-test/backend/src/main/java/io/metersphere/controller/PerformanceTestController.java @@ -129,6 +129,7 @@ public class PerformanceTestController { @GetMapping("/get/{testId}") @RequiresPermissions(PermissionConstants.PROJECT_PERFORMANCE_TEST_READ) + @CheckOwner(resourceId = "#testId", resourceType = "load_test") public LoadTestDTO get(@PathVariable String testId) { LoadTestDTO loadTestDTO = performanceTestService.get(testId); loadTestDTO.setIsNeedUpdate(apiPerformanceService.isNeedUpdate(loadTestDTO.getId())); @@ -137,18 +138,21 @@ public class PerformanceTestController { @GetMapping("/get-advanced-config/{testId}") @RequiresPermissions(PermissionConstants.PROJECT_PERFORMANCE_TEST_READ) + @CheckOwner(resourceId = "#testId", resourceType = "load_test") public String getAdvancedConfiguration(@PathVariable String testId) { return performanceTestService.getAdvancedConfiguration(testId); } @GetMapping("/get-load-config/{testId}") @RequiresPermissions(PermissionConstants.PROJECT_PERFORMANCE_TEST_READ) + @CheckOwner(resourceId = "#testId", resourceType = "load_test") public String getLoadConfiguration(@PathVariable String testId) { return performanceTestService.getLoadConfiguration(testId); } @GetMapping("/get-jmx-content/{testId}") @RequiresPermissions(PermissionConstants.PROJECT_PERFORMANCE_TEST_READ) + @CheckOwner(resourceId = "#testId", resourceType = "load_test") public List getJmxContent(@PathVariable String testId) { return performanceTestService.getJmxContent(testId); }