fix(测试计划): 分享报告打开报错问题

--bug=1040958 --user=宋昌昌 【测试计划】报告-分享报告-无痕打开报错 https://www.tapd.cn/55049933/s/1518957
This commit is contained in:
song-cc-rock 2024-05-23 11:29:20 +08:00 committed by 刘瑞斌
parent d855781507
commit 985135a621
2 changed files with 1 additions and 6 deletions

View File

@ -84,8 +84,8 @@ public class FilterChainUtils {
filterChainDefinitionMap.put("/api/report/scenario/share/**", "anon");
filterChainDefinitionMap.put("/api/report/share/get/**", "anon");
// 测试计划报告分享接口
filterChainDefinitionMap.put("/test-plan/report/share/get/detail/**", "anon");
filterChainDefinitionMap.put("/test-plan/report/share/detail/**", "anon");
filterChainDefinitionMap.put("/test-plan/report/share/get/**", "anon");
return filterChainDefinitionMap;
}

View File

@ -47,14 +47,12 @@ public class TestPlanReportShareController {
@GetMapping("/get/{id}")
@Operation(summary = "测试计划-报告-获取分享链接")
@RequiresPermissions(PermissionConstants.TEST_PLAN_REPORT_READ_SHARE)
public TestPlanShareResponse get(@PathVariable String id) {
return testPlanReportShareService.get(id);
}
@GetMapping("/get-share-time/{id}")
@Operation(summary = "测试计划-报告-获取分享链接的有效时间")
@RequiresPermissions(PermissionConstants.TEST_PLAN_REPORT_READ_SHARE)
public String getShareTime(@PathVariable String id) {
return testPlanReportShareService.getShareTime(id);
}
@ -63,7 +61,6 @@ public class TestPlanReportShareController {
@GetMapping("/get/detail/{shareId}/{reportId}")
@Operation(summary = "测试计划-报告分享-详情查看")
@CheckOwner(resourceId = "#id", resourceType = "test_plan_report")
public TestPlanReportDetailResponse getDetail(@PathVariable String shareId, @PathVariable String reportId) {
ShareInfo shareInfo = testPlanReportShareService.checkResource(shareId);
testPlanReportShareService.validateExpired(shareInfo);
@ -72,7 +69,6 @@ public class TestPlanReportShareController {
@PostMapping("/detail/bug/page")
@Operation(summary = "测试计划-报告-详情-缺陷分页查询")
@CheckOwner(resourceId = "#reportId", resourceType = "test_plan_report")
public Pager<List<BugDTO>> pageBug(@Validated @RequestBody TestPlanShareReportDetailRequest request) {
ShareInfo shareInfo = testPlanReportShareService.checkResource(request.getShareId());
testPlanReportShareService.validateExpired(shareInfo);
@ -83,7 +79,6 @@ public class TestPlanReportShareController {
@PostMapping("/detail/functional/case/page")
@Operation(summary = "测试计划-报告-详情-功能用例分页查询")
@CheckOwner(resourceId = "#reportId", resourceType = "test_plan_report")
public Pager<List<ReportDetailCasePageDTO>> pageFunctionalCase(@Validated @RequestBody TestPlanShareReportDetailRequest request) {
ShareInfo shareInfo = testPlanReportShareService.checkResource(request.getShareId());
testPlanReportShareService.validateExpired(shareInfo);