diff --git a/backend/framework/domain/src/main/resources/migration/3.0.0/dml/V3.0.0_11_1__data.sql b/backend/framework/domain/src/main/resources/migration/3.0.0/dml/V3.0.0_11_1__data.sql index 5f6259ebaa..ea1bb86af5 100644 --- a/backend/framework/domain/src/main/resources/migration/3.0.0/dml/V3.0.0_11_1__data.sql +++ b/backend/framework/domain/src/main/resources/migration/3.0.0/dml/V3.0.0_11_1__data.sql @@ -95,6 +95,10 @@ INSERT INTO user_role_permission (id, role_id, permission_id) VALUES (UUID_SHORT INSERT INTO user_role_permission (id, role_id, permission_id) VALUES (UUID_SHORT(), 'project_admin', 'PROJECT_MESSAGE:READ+ADD'); INSERT INTO user_role_permission (id, role_id, permission_id) VALUES (UUID_SHORT(), 'project_admin', 'PROJECT_MESSAGE:READ+UPDATE'); INSERT INTO user_role_permission (id, role_id, permission_id) VALUES (UUID_SHORT(), 'project_admin', 'PROJECT_MESSAGE:READ+DELETE'); +INSERT INTO user_role_permission (id, role_id, permission_id) VALUES (UUID_SHORT(), 'project_admin', 'PROJECT_VERSION:READ'); +INSERT INTO user_role_permission (id, role_id, permission_id) VALUES (UUID_SHORT(), 'project_admin', 'PROJECT_VERSION:READ+ADD'); +INSERT INTO user_role_permission (id, role_id, permission_id) VALUES (UUID_SHORT(), 'project_admin', 'PROJECT_VERSION:READ+UPDATE'); +INSERT INTO user_role_permission (id, role_id, permission_id) VALUES (UUID_SHORT(), 'project_admin', 'PROJECT_VERSION:READ+DELETE'); INSERT INTO user_role_permission (id, role_id, permission_id) VALUES (UUID_SHORT(), 'project_admin', 'PROJECT_FAKE_ERROR:READ'); INSERT INTO user_role_permission (id, role_id, permission_id) VALUES (UUID_SHORT(), 'project_admin', 'PROJECT_FAKE_ERROR:READ+ADD'); INSERT INTO user_role_permission (id, role_id, permission_id) VALUES (UUID_SHORT(), 'project_admin', 'PROJECT_FAKE_ERROR:READ+UPDATE'); 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 bdbd7b33b0..166e39abd8 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 @@ -168,5 +168,13 @@ public class PermissionConstants { public static final String PROJECT_ENVIRONMENT_READ_EXPORT = "PROJECT_ENVIRONMENT:READ+EXPORT"; /*------ end: PROJECT_ENVIRONMENT ------*/ - + /** + * 项目版本权限 + */ + /*------ start: PROJECT_VERSION ------*/ + public static final String PROJECT_VERSION_READ = "PROJECT_VERSION:READ"; + public static final String PROJECT_VERSION_READ_ADD = "PROJECT_VERSION:READ+ADD"; + public static final String PROJECT_VERSION_READ_UPDATE = "PROJECT_VERSION:READ+UPDATE"; + public static final String PROJECT_VERSION_READ_DELETE = "PROJECT_VERSION:READ+DELETE"; + /*------ end: PROJECT_VERSION ------*/ } diff --git a/backend/framework/sdk/src/main/resources/i18n/project_en_US.properties b/backend/framework/sdk/src/main/resources/i18n/project_en_US.properties index 3e8e3e6daf..d07e987dc2 100644 --- a/backend/framework/sdk/src/main/resources/i18n/project_en_US.properties +++ b/backend/framework/sdk/src/main/resources/i18n/project_en_US.properties @@ -129,7 +129,9 @@ permission.project_application_api.read=API test read permission.project_application_api.update=API test update permission.project_base_info.name=Project base info permission.project_log.name=Operation log - +# project version +project.version.exist=Version exist +project.version.not_exist=Version not exist #environment datasource environment_datasource.id.not_blank=ID is required environment_datasource.driver.not_blank=Driver is required diff --git a/backend/framework/sdk/src/main/resources/i18n/project_zh_CN.properties b/backend/framework/sdk/src/main/resources/i18n/project_zh_CN.properties index 3edf09fcc6..42ad41a1b9 100644 --- a/backend/framework/sdk/src/main/resources/i18n/project_zh_CN.properties +++ b/backend/framework/sdk/src/main/resources/i18n/project_zh_CN.properties @@ -129,7 +129,9 @@ permission.project_application_api.read=接口测试-查询 permission.project_application_api.update=接口测试-编辑 permission.project_base_info.name=基本信息 permission.project_log.name=日志 - +# project version +project.version.exist=版本已存在 +project.version.not_exist=版本不存在 #environment datasource environment_datasource.id.not_blank=ID不能为空 environment_datasource.driver.not_blank=驱动不能为空 diff --git a/backend/framework/sdk/src/main/resources/i18n/project_zh_TW.properties b/backend/framework/sdk/src/main/resources/i18n/project_zh_TW.properties index 3a41e6552e..be6f9859c4 100644 --- a/backend/framework/sdk/src/main/resources/i18n/project_zh_TW.properties +++ b/backend/framework/sdk/src/main/resources/i18n/project_zh_TW.properties @@ -129,7 +129,9 @@ permission.project_application_api.read=接口測試-查詢 permission.project_application_api.update=接口測試-編輯 permission.project_base_info.name=基本信息 permission.project_log.name=日誌 - +# project version +project.version.exist=版本已存在 +project.version.not_exist=版本不存在 #environment datasource environment_datasource.id.not_blank=ID不能為空 environment_datasource.driver.not_blank=驅動不能為空 diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtProjectMemberMapper.xml b/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtProjectMemberMapper.xml index c77e83dc25..61a9b5d17a 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtProjectMemberMapper.xml +++ b/backend/services/project-management/src/main/java/io/metersphere/project/mapper/ExtProjectMemberMapper.xml @@ -14,6 +14,7 @@ + order by u.name