diff --git a/backend/src/main/java/io/metersphere/commons/constants/PermissionConstants.java b/backend/src/main/java/io/metersphere/commons/constants/PermissionConstants.java index 7e85720ada..8d3b33e994 100644 --- a/backend/src/main/java/io/metersphere/commons/constants/PermissionConstants.java +++ b/backend/src/main/java/io/metersphere/commons/constants/PermissionConstants.java @@ -159,6 +159,10 @@ public class PermissionConstants { public static final String PROJECT_UI_SCENARIO_READ_MOVE_BATCH = "PROJECT_UI_SCENARIO:READ+MOVE_BATCH"; public static final String PROJECT_UI_SCENARIO_READ_CREATE_PERFORMANCE = "PROJECT_UI_SCENARIO:READ+CREATE_PERFORMANCE"; + public static final String PROJECT_UI_ELEMENT_READ = "PROJECT_UI_SCENARIO:READ"; + public static final String PROJECT_UI_ELEMENT_READ_CREATE = "PROJECT_UI_SCENARIO:READ+CREATE"; + public static final String PROJECT_UI_ELEMENT_READ_EDIT = "PROJECT_UI_SCENARIO:READ+EDIT"; + public static final String PROJECT_UI_ELEMENT_READ_DELETE = "PROJECT_UI_SCENARIO:READ+DELETE"; public static final String PROJECT_API_REPORT_READ = "PROJECT_API_REPORT:READ"; public static final String PROJECT_API_REPORT_READ_DELETE = "PROJECT_API_REPORT:READ+DELETE"; diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index f7085d2b4f..27109d6d98 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit f7085d2b4f5a8be316de10f1932d00e49093a4d2 +Subproject commit 27109d6d986204b7579b2212294db289a8755d5a diff --git a/backend/src/main/resources/db/migration/V115__1.20__release.sql b/backend/src/main/resources/db/migration/V115__1.20__release.sql index 73bab73e27..6570ae20e3 100644 --- a/backend/src/main/resources/db/migration/V115__1.20__release.sql +++ b/backend/src/main/resources/db/migration/V115__1.20__release.sql @@ -160,6 +160,15 @@ INSERT INTO user_group_permission (id, group_id, permission_id, module_id) VALUES (UUID(), 'project_admin', 'PROJECT_UI_REPORT:READ+EXPORT', 'PROJECT_UI_REPORT'); INSERT INTO user_group_permission (id, group_id, permission_id, module_id) VALUES (UUID(), 'project_admin', 'PROJECT_UI_REPORT:READ', 'PROJECT_UI_REPORT'); +INSERT INTO user_group_permission (id, group_id, permission_id, module_id) +VALUES (UUID(), 'project_admin', 'PROJECT_UI_ELEMENT:READ', 'PROJECT_UI_ELEMENT'); +INSERT INTO user_group_permission (id, group_id, permission_id, module_id) +VALUES (UUID(), 'project_admin', 'PROJECT_UI_ELEMENT:READ+CREATE', 'PROJECT_UI_ELEMENT'); +INSERT INTO user_group_permission (id, group_id, permission_id, module_id) +VALUES (UUID(), 'project_admin', 'PROJECT_UI_ELEMENT:READ+DELETE', 'PROJECT_UI_ELEMENT'); +INSERT INTO user_group_permission (id, group_id, permission_id, module_id) +VALUES (UUID(), 'project_admin', 'PROJECT_UI_ELEMENT:READ+EDIT', 'PROJECT_UI_ELEMENT'); + -- CREATE INDEX test_case_node_project_id_index diff --git a/backend/src/main/resources/permission.json b/backend/src/main/resources/permission.json index b4ffa48594..e9b96952c2 100644 --- a/backend/src/main/resources/permission.json +++ b/backend/src/main/resources/permission.json @@ -772,6 +772,30 @@ "name": "permission.project_api_report.export", "resourceId": "PROJECT_API_REPORT" }, + { + "id": "PROJECT_UI_ELEMENT:READ", + "name": "permission.project_ui_element.read", + "resourceId": "PROJECT_UI_ELEMENT", + "license": true + }, + { + "id": "PROJECT_UI_ELEMENT:READ+CREATE", + "name": "permission.project_ui_element.create", + "resourceId": "PROJECT_UI_ELEMENT", + "license": true + }, + { + "id": "PROJECT_UI_ELEMENT:READ+EDIT", + "name": "permission.project_ui_element.edit", + "resourceId": "PROJECT_UI_ELEMENT", + "license": true + }, + { + "id": "PROJECT_UI_ELEMENT:READ+DELETE", + "name": "permission.project_ui_element.delete", + "resourceId": "PROJECT_UI_ELEMENT", + "license": true + }, { "id": "PROJECT_UI_SCENARIO:READ", "name": "permission.project_ui_scenario.read", @@ -1219,6 +1243,11 @@ "id": "PROJECT_API_REPORT", "name": "permission.project_api_report.name" }, + { + "id": "PROJECT_UI_ELEMENT", + "name": "permission.project_ui_element.name", + "license": true + }, { "id": "PROJECT_UI_SCENARIO", "name": "permission.project_ui_scenario.name", @@ -1226,7 +1255,8 @@ }, { "id": "PROJECT_UI_REPORT", - "name": "permission.project_ui_report.name" + "name": "permission.project_ui_report.name", + "license": true }, { "id": "PROJECT_PERFORMANCE_TEST", diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack index 74e1608ed1..62aafadf61 160000 --- a/frontend/src/business/components/xpack +++ b/frontend/src/business/components/xpack @@ -1 +1 @@ -Subproject commit 74e1608ed158b3db017e0ad9addb7f6736e3802e +Subproject commit 62aafadf6171553cdec3dc60e4f5c0ec3a15944e diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index a277bb6935..7e0a5db422 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -3059,6 +3059,14 @@ export default { delete: "DELETE", export: "EXPORT", }, + project_ui_element: { + name: "Element", + read: "READ", + create: "CREATE", + edit: "EDIT", + delete: "DELETE", + copy: "COPY", + }, project_performance_test: { name: "Test", read: "READ", diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index b7f44b19ea..5598c12393 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -3063,6 +3063,14 @@ export default { delete: "删除报告", export: "导出报告", }, + project_ui_element: { + name: "元素库", + read: "查询元素", + create: "创建元素", + edit: "编辑元素", + delete: "删除元素", + copy: "复制元素", + }, project_performance_test: { name: "测试", read: "查询测试", diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index 25eb0f9f13..1831ac2d2d 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -3062,6 +3062,14 @@ export default { delete: "刪除報告", export: "導出報告", }, + project_ui_element: { + name: "元素庫", + read: "查詢元素", + create: "創建元素", + edit: "編輯元素", + delete: "刪除元素", + copy: "複製元素", + }, project_performance_test: { name: "測試", read: "查詢測試",