diff --git a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java index 4327714548..d5f3d0f277 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/scenario/ApiScenarioService.java @@ -2201,6 +2201,14 @@ public class ApiScenarioService { if (scenario == null) { return; } + long count = SessionUtils.getUser().getGroups() + .stream() + .filter(g -> StringUtils.equals(userId, UserGroupConstants.SUPER_GROUP)) + .count(); + + if (count > 0) { + return; + } if (!extCheckOwnerMapper.checkoutOwner("api_scenario", userId, List.of(scenarioId))) { MSException.throwException(Translator.get("check_owner_case")); } diff --git a/test-track/backend/src/main/java/io/metersphere/controller/TestPlanReportController.java b/test-track/backend/src/main/java/io/metersphere/controller/TestPlanReportController.java index f0f2c0d9bf..03379648db 100644 --- a/test-track/backend/src/main/java/io/metersphere/controller/TestPlanReportController.java +++ b/test-track/backend/src/main/java/io/metersphere/controller/TestPlanReportController.java @@ -69,7 +69,7 @@ public class TestPlanReportController { @GetMapping("/status/{planId}") @RequiresPermissions(PermissionConstants.PROJECT_TRACK_REPORT_READ) - @CheckOwner(resourceId = "#planId", resourceType = "test_plan") + @CheckOwner(resourceId = "#planId", resourceType = "test_plan_report") public String getStatus(@PathVariable String planId) { TestPlanReport report = testPlanReportService.getTestPlanReport(planId); String status = report.getStatus();