fix(测试计划): 修复校验资源权限报错的缺陷
This commit is contained in:
parent
7422e6afbc
commit
ce8e4c2175
|
@ -18,8 +18,8 @@
|
|||
FROM user_role_relation
|
||||
WHERE source_id IN (SELECT project_id
|
||||
FROM ${table} JOIN ${relationTable} ON ${table}.id = ${relationTable}.${table}_id
|
||||
JOIN project ON ${table}.project_id = project.id AND project.enable = TRUE
|
||||
WHERE ${table}.id IN
|
||||
JOIN project ON ${table}.project_id = project.id AND project.enable = TRUE
|
||||
WHERE ${relationTable}.id IN
|
||||
<foreach collection="ids" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>)
|
||||
|
|
|
@ -126,7 +126,7 @@ public class TestPlanApiCaseController {
|
|||
@GetMapping("/run/{id}")
|
||||
@Operation(summary = "用例执行")
|
||||
@RequiresPermissions(PermissionConstants.TEST_PLAN_READ_EXECUTE)
|
||||
@CheckOwner(resourceId = "#id", resourceType = "test_plan_api_case", relationType = "test_plan")
|
||||
@CheckOwner(resourceId = "#id", resourceType = "test_plan", relationType = "test_plan_api_case")
|
||||
public TaskRequestDTO run(@PathVariable String id,
|
||||
@Schema(description = "报告ID,传了可以实时获取结果,不传则不支持实时获取")
|
||||
@RequestParam(required = false) String reportId) {
|
||||
|
@ -137,7 +137,7 @@ public class TestPlanApiCaseController {
|
|||
@PostMapping("/batch/run")
|
||||
@Operation(summary = "批量执行")
|
||||
@RequiresPermissions(PermissionConstants.TEST_PLAN_READ_EXECUTE)
|
||||
@CheckOwner(resourceId = "#request.getSelectIds()", resourceType = "test_plan_api_case", relationType = "test_plan")
|
||||
@CheckOwner(resourceId = "#request.getSelectIds()", resourceType = "test_plan", relationType = "test_plan_api_case")
|
||||
public void batchRun(@Validated @RequestBody TestPlanApiCaseBatchRunRequest request) {
|
||||
testPlanApiCaseBatchRunService.asyncBatchRun(request, SessionUtils.getUserId());
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ public class TestPlanApiScenarioController {
|
|||
@GetMapping("/run/{id}")
|
||||
@Operation(summary = "接口测试-接口场景管理-场景执行")
|
||||
@RequiresPermissions(PermissionConstants.TEST_PLAN_READ_EXECUTE)
|
||||
@CheckOwner(resourceId = "#id", resourceType = "test_plan_api_scenario", relationType = "test_plan")
|
||||
@CheckOwner(resourceId = "#id", resourceType = "test_plan", relationType = "test_plan_api_scenario")
|
||||
public TaskRequestDTO run(@PathVariable String id, @RequestParam(required = false) String reportId) {
|
||||
return testPlanApiScenarioService.run(id, reportId, SessionUtils.getUserId());
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ public class TestPlanApiScenarioController {
|
|||
@PostMapping("/batch/run")
|
||||
@Operation(summary = "批量执行")
|
||||
@RequiresPermissions(PermissionConstants.TEST_PLAN_READ_EXECUTE)
|
||||
@CheckOwner(resourceId = "#request.getSelectIds()", resourceType = "test_plan_api_scenario", relationType = "test_plan")
|
||||
@CheckOwner(resourceId = "#request.getSelectIds()", resourceType = "test_plan", relationType = "test_plan_api_scenario")
|
||||
public void batchRun(@Validated @RequestBody TestPlanApiScenarioBatchRunRequest request) {
|
||||
testPlanApiScenarioBatchRunService.asyncBatchRun(request, SessionUtils.getUserId());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue