From 94c7a68df51dd952652e9af034fd80a0fb69e1ce Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Fri, 3 Nov 2023 16:00:59 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B):=20?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B=E5=A2=9E=E5=8A=A0=E6=9D=83?= =?UTF-8?q?=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sdk/constants/PermissionConstants.java | 4 ++ .../src/main/resources/i18n/case.properties | 4 ++ .../main/resources/i18n/case_en_US.properties | 4 ++ .../main/resources/i18n/case_zh_CN.properties | 4 ++ .../main/resources/i18n/case_zh_TW.properties | 4 ++ .../src/main/resources/permission.json | 37 +++++++++++++++++++ 6 files changed, 57 insertions(+) create mode 100644 backend/services/case-management/src/main/resources/permission.json diff --git a/backend/framework/sdk/src/main/java/io/metersphere/sdk/constants/PermissionConstants.java b/backend/framework/sdk/src/main/java/io/metersphere/sdk/constants/PermissionConstants.java index cacc08b2fc..d561c09d41 100644 --- a/backend/framework/sdk/src/main/java/io/metersphere/sdk/constants/PermissionConstants.java +++ b/backend/framework/sdk/src/main/java/io/metersphere/sdk/constants/PermissionConstants.java @@ -213,6 +213,10 @@ public class PermissionConstants { public static final String FUNCTIONAL_CASE_READ_UPDATE = "FUNCTIONAL_CASE:READ+UPDATE"; public static final String FUNCTIONAL_CASE_READ_DELETE = "FUNCTIONAL_CASE:READ+DELETE"; public static final String FUNCTIONAL_CASE_READ_COMMENT = "FUNCTIONAL_CASE:READ+COMMENT"; + public static final String FUNCTIONAL_CASE_READ_EXPORT = "FUNCTIONAL_CASE:READ+EXPORT"; + public static final String FUNCTIONAL_CASE_READ_IMPORT = "FUNCTIONAL_CASE:READ+IMPORT"; + + /*------ end: FUNCTIONAL_CASE ------*/ diff --git a/backend/framework/sdk/src/main/resources/i18n/case.properties b/backend/framework/sdk/src/main/resources/i18n/case.properties index bdbee0ef8c..011c857ce4 100644 --- a/backend/framework/sdk/src/main/resources/i18n/case.properties +++ b/backend/framework/sdk/src/main/resources/i18n/case.properties @@ -1,3 +1,7 @@ +# permission +permission.case_management.name=用例管理 +permission.functional_case.name=功能用例 +permission.functional_case.comment=评论 #module:FunctionalCase functional_case.id.not_blank=ID不能为空 functional_case.num.not_blank=业务ID不能为空 diff --git a/backend/framework/sdk/src/main/resources/i18n/case_en_US.properties b/backend/framework/sdk/src/main/resources/i18n/case_en_US.properties index 9b79ccda26..3a82f7a765 100644 --- a/backend/framework/sdk/src/main/resources/i18n/case_en_US.properties +++ b/backend/framework/sdk/src/main/resources/i18n/case_en_US.properties @@ -1,3 +1,7 @@ +# permission +permission.case_management.name=Case management +permission.functional_case.name=Functional case +permission.functional_case.comment=Comment #module:FunctionalCase functional_case.id.not_blank=ID cannot be empty functional_case.num.not_blank=Business ID cannot be empty diff --git a/backend/framework/sdk/src/main/resources/i18n/case_zh_CN.properties b/backend/framework/sdk/src/main/resources/i18n/case_zh_CN.properties index 1f8308d164..104b401cbd 100644 --- a/backend/framework/sdk/src/main/resources/i18n/case_zh_CN.properties +++ b/backend/framework/sdk/src/main/resources/i18n/case_zh_CN.properties @@ -1,3 +1,7 @@ +# permission +permission.case_management.name=用例管理 +permission.functional_case.name=功能用例 +permission.functional_case.comment=评论 #module:FunctionalCase functional_case.id.not_blank=ID不能为空 functional_case.num.not_blank=业务ID不能为空 diff --git a/backend/framework/sdk/src/main/resources/i18n/case_zh_TW.properties b/backend/framework/sdk/src/main/resources/i18n/case_zh_TW.properties index 611bdf409a..772ac664e6 100644 --- a/backend/framework/sdk/src/main/resources/i18n/case_zh_TW.properties +++ b/backend/framework/sdk/src/main/resources/i18n/case_zh_TW.properties @@ -1,3 +1,7 @@ +# permission +permission.case_management.name=用例管理 +permission.functional_case.name=功能用例 +permission.functional_case.comment=評論 #module:FunctionalCase functional_case.id.not_blank=ID不能為空 functional_case.num.not_blank=业务ID不能為空 diff --git a/backend/services/case-management/src/main/resources/permission.json b/backend/services/case-management/src/main/resources/permission.json new file mode 100644 index 0000000000..2cda48a377 --- /dev/null +++ b/backend/services/case-management/src/main/resources/permission.json @@ -0,0 +1,37 @@ +[ + { + "id": "CASE_MANAGEMENT", + "name": "permission.case_management.name", + "type": "CASE_MANAGEMENT", + "children": [ + { + "id": "FUNCTIONAL_CASE", + "name": "permission.functional_case.name", + "permissions": [ + { + "id": "FUNCTIONAL_CASE:READ" + }, + { + "id": "FUNCTIONAL_CASE:READ+ADD" + }, + { + "id": "FUNCTIONAL_CASE:READ+UPDATE" + }, + { + "id": "FUNCTIONAL_CASE:READ+DELETE" + }, + { + "id": "FUNCTIONAL_CASE:READ+COMMENT", + "name": "permission.functional_case.comment" + }, + { + "id": "FUNCTIONAL_CASE:READ+EXPORT" + }, + { + "id": "FUNCTIONAL_CASE:READ+IMPORT" + } + ] + } + ] + } +]