diff --git a/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_10__functional_case.sql b/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_10__functional_case.sql index 783f0f05ab..83e35531a8 100644 --- a/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_10__functional_case.sql +++ b/backend/framework/domain/src/main/resources/migration/3.0.0/ddl/V3.0.0_10__functional_case.sql @@ -186,7 +186,7 @@ CREATE TABLE IF NOT EXISTS functional_case_demand ( `id` VARCHAR(50) NOT NULL COMMENT 'ID', `case_id` VARCHAR(50) NOT NULL COMMENT '功能用例ID', - `parent` VARCHAR(50) NOT NULL DEFAULT 'NONE' COMMENT '父需求id', + `parent` VARCHAR(255) NOT NULL DEFAULT 'NONE' COMMENT '父需求id', `demand_id` VARCHAR(255) COMMENT '需求ID', `demand_name` VARCHAR(255) NOT NULL DEFAULT 'NONE' COMMENT '需求标题', `demand_url` VARCHAR(255) COMMENT '需求地址', diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/controller/FunctionalCaseController.java b/backend/services/case-management/src/main/java/io/metersphere/functional/controller/FunctionalCaseController.java index d527df2166..eebece18c2 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/controller/FunctionalCaseController.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/controller/FunctionalCaseController.java @@ -35,6 +35,7 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; import jakarta.servlet.http.HttpServletResponse; import jakarta.validation.constraints.NotBlank; +import org.apache.shiro.authz.annotation.Logical; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -86,7 +87,7 @@ public class FunctionalCaseController { @GetMapping("/detail/{id}") @Operation(summary = "用例管理-功能用例-查看用例详情") - @RequiresPermissions(PermissionConstants.FUNCTIONAL_CASE_READ) + @RequiresPermissions(value = {PermissionConstants.FUNCTIONAL_CASE_READ, PermissionConstants.CASE_REVIEW_READ}, logical = Logical.OR) @CheckOwner(resourceId = "#id", resourceType = "functional_case") public FunctionalCaseDetailDTO getFunctionalCaseDetail(@PathVariable String id) { String userId = SessionUtils.getUserId(); diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/controller/ReviewFunctionalCaseController.java b/backend/services/case-management/src/main/java/io/metersphere/functional/controller/ReviewFunctionalCaseController.java index 2022e89430..3f8d88880d 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/controller/ReviewFunctionalCaseController.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/controller/ReviewFunctionalCaseController.java @@ -40,7 +40,7 @@ public class ReviewFunctionalCaseController { @GetMapping("/get/list/{reviewId}/{caseId}") @Operation(summary = "用例管理-用例评审-评审功能用例-获取用例评审历史") - @RequiresPermissions(PermissionConstants.FUNCTIONAL_CASE_READ) + @RequiresPermissions(PermissionConstants.CASE_REVIEW_READ) public List getCaseReviewHistoryList(@PathVariable String reviewId, @PathVariable String caseId) { return reviewFunctionalCaseService.getCaseReviewHistoryList(reviewId, caseId); }