From 985135a6219b3e8ecaf1c5a2648cff6c5a6c2802 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Thu, 23 May 2024 11:29:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E5=88=86=E4=BA=AB=E6=8A=A5=E5=91=8A=E6=89=93=E5=BC=80=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1040958 --user=宋昌昌 【测试计划】报告-分享报告-无痕打开报错 https://www.tapd.cn/55049933/s/1518957 --- .../main/java/io/metersphere/sdk/util/FilterChainUtils.java | 2 +- .../plan/controller/TestPlanReportShareController.java | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/util/FilterChainUtils.java b/backend/framework/sdk/src/main/java/io/metersphere/sdk/util/FilterChainUtils.java index ed3156cff7..ec16d8d2cc 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/util/FilterChainUtils.java +++ b/backend/framework/sdk/src/main/java/io/metersphere/sdk/util/FilterChainUtils.java @@ -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; } diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanReportShareController.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanReportShareController.java index b0464dd70e..8f194b9b01 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanReportShareController.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/controller/TestPlanReportShareController.java @@ -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> 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> pageFunctionalCase(@Validated @RequestBody TestPlanShareReportDetailRequest request) { ShareInfo shareInfo = testPlanReportShareService.checkResource(request.getShareId()); testPlanReportShareService.validateExpired(shareInfo);