fix(测试计划): 修复校验资源权限错误的缺陷

This commit is contained in:
wxg0103 2024-06-25 16:27:37 +08:00 committed by jianxing
parent be4c69034f
commit 8c4543caf4
2 changed files with 2 additions and 2 deletions

View File

@ -137,7 +137,7 @@ public class TestPlanApiCaseController {
@PostMapping("/batch/run") @PostMapping("/batch/run")
@Operation(summary = "批量执行") @Operation(summary = "批量执行")
@RequiresPermissions(PermissionConstants.TEST_PLAN_READ_EXECUTE) @RequiresPermissions(PermissionConstants.TEST_PLAN_READ_EXECUTE)
@CheckOwner(resourceId = "#request.getId()", resourceType = "test_plan_api_case", relationType = "test_plan") @CheckOwner(resourceId = "#request.getSelectIds()", resourceType = "test_plan_api_case", relationType = "test_plan")
public void batchRun(@Validated @RequestBody TestPlanApiCaseBatchRunRequest request) { public void batchRun(@Validated @RequestBody TestPlanApiCaseBatchRunRequest request) {
testPlanApiCaseBatchRunService.asyncBatchRun(request, SessionUtils.getUserId()); testPlanApiCaseBatchRunService.asyncBatchRun(request, SessionUtils.getUserId());
} }

View File

@ -87,7 +87,7 @@ public class TestPlanApiScenarioController {
@PostMapping("/batch/run") @PostMapping("/batch/run")
@Operation(summary = "批量执行") @Operation(summary = "批量执行")
@RequiresPermissions(PermissionConstants.TEST_PLAN_READ_EXECUTE) @RequiresPermissions(PermissionConstants.TEST_PLAN_READ_EXECUTE)
@CheckOwner(resourceId = "#request.getId()", resourceType = "test_plan_api_scenario", relationType = "test_plan") @CheckOwner(resourceId = "#request.getSelectIds()", resourceType = "test_plan_api_scenario", relationType = "test_plan")
public void batchRun(@Validated @RequestBody TestPlanApiScenarioBatchRunRequest request) { public void batchRun(@Validated @RequestBody TestPlanApiScenarioBatchRunRequest request) {
testPlanApiScenarioBatchRunService.asyncBatchRun(request, SessionUtils.getUserId()); testPlanApiScenarioBatchRunService.asyncBatchRun(request, SessionUtils.getUserId());
} }