fix(性能测试): 性能测试部分接口加上checkowner
This commit is contained in:
parent
52c1ba2376
commit
69929b34ee
|
@ -129,6 +129,7 @@ public class PerformanceTestController {
|
||||||
|
|
||||||
@GetMapping("/get/{testId}")
|
@GetMapping("/get/{testId}")
|
||||||
@RequiresPermissions(PermissionConstants.PROJECT_PERFORMANCE_TEST_READ)
|
@RequiresPermissions(PermissionConstants.PROJECT_PERFORMANCE_TEST_READ)
|
||||||
|
@CheckOwner(resourceId = "#testId", resourceType = "load_test")
|
||||||
public LoadTestDTO get(@PathVariable String testId) {
|
public LoadTestDTO get(@PathVariable String testId) {
|
||||||
LoadTestDTO loadTestDTO = performanceTestService.get(testId);
|
LoadTestDTO loadTestDTO = performanceTestService.get(testId);
|
||||||
loadTestDTO.setIsNeedUpdate(apiPerformanceService.isNeedUpdate(loadTestDTO.getId()));
|
loadTestDTO.setIsNeedUpdate(apiPerformanceService.isNeedUpdate(loadTestDTO.getId()));
|
||||||
|
@ -137,18 +138,21 @@ public class PerformanceTestController {
|
||||||
|
|
||||||
@GetMapping("/get-advanced-config/{testId}")
|
@GetMapping("/get-advanced-config/{testId}")
|
||||||
@RequiresPermissions(PermissionConstants.PROJECT_PERFORMANCE_TEST_READ)
|
@RequiresPermissions(PermissionConstants.PROJECT_PERFORMANCE_TEST_READ)
|
||||||
|
@CheckOwner(resourceId = "#testId", resourceType = "load_test")
|
||||||
public String getAdvancedConfiguration(@PathVariable String testId) {
|
public String getAdvancedConfiguration(@PathVariable String testId) {
|
||||||
return performanceTestService.getAdvancedConfiguration(testId);
|
return performanceTestService.getAdvancedConfiguration(testId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/get-load-config/{testId}")
|
@GetMapping("/get-load-config/{testId}")
|
||||||
@RequiresPermissions(PermissionConstants.PROJECT_PERFORMANCE_TEST_READ)
|
@RequiresPermissions(PermissionConstants.PROJECT_PERFORMANCE_TEST_READ)
|
||||||
|
@CheckOwner(resourceId = "#testId", resourceType = "load_test")
|
||||||
public String getLoadConfiguration(@PathVariable String testId) {
|
public String getLoadConfiguration(@PathVariable String testId) {
|
||||||
return performanceTestService.getLoadConfiguration(testId);
|
return performanceTestService.getLoadConfiguration(testId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/get-jmx-content/{testId}")
|
@GetMapping("/get-jmx-content/{testId}")
|
||||||
@RequiresPermissions(PermissionConstants.PROJECT_PERFORMANCE_TEST_READ)
|
@RequiresPermissions(PermissionConstants.PROJECT_PERFORMANCE_TEST_READ)
|
||||||
|
@CheckOwner(resourceId = "#testId", resourceType = "load_test")
|
||||||
public List<LoadTestExportJmx> getJmxContent(@PathVariable String testId) {
|
public List<LoadTestExportJmx> getJmxContent(@PathVariable String testId) {
|
||||||
return performanceTestService.getJmxContent(testId);
|
return performanceTestService.getJmxContent(testId);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue