From 3904b634a9cff5871bcf312bc59d10ef938484e5 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Mon, 21 Feb 2022 14:33:46 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=BF=A1=E6=81=AF=E6=9D=83=E9=99=90=E5=85=AC?= =?UTF-8?q?=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --user=郭雨琦 个人信息权限公开 --- .../metersphere/api/service/ShareInfoService.java | 5 +++-- .../main/resources/i18n/messages_en_US.properties | 1 + .../main/resources/i18n/messages_zh_CN.properties | 1 + .../main/resources/i18n/messages_zh_TW.properties | 1 + backend/src/main/resources/permission.json | 15 +++++---------- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/service/ShareInfoService.java b/backend/src/main/java/io/metersphere/api/service/ShareInfoService.java index 7ee7c42e47..f332ba11db 100644 --- a/backend/src/main/java/io/metersphere/api/service/ShareInfoService.java +++ b/backend/src/main/java/io/metersphere/api/service/ShareInfoService.java @@ -16,6 +16,7 @@ import io.metersphere.commons.utils.BeanUtils; import io.metersphere.commons.utils.CommonBeanFactory; import io.metersphere.commons.utils.LogUtil; import io.metersphere.commons.utils.SessionUtils; +import io.metersphere.i18n.Translator; import io.metersphere.service.ProjectApplicationService; import io.metersphere.track.service.TestPlanApiCaseService; import io.metersphere.track.service.TestPlanScenarioCaseService; @@ -518,7 +519,7 @@ public class ShareInfoService { public void validateExpired(ShareInfo shareInfo) { // 有效期根据类型从ProjectApplication中获取 if(shareInfo == null ){ - MSException.throwException("连接已失效,请重新获取!"); + MSException.throwException(Translator.get("connection_expired")); } String type = ""; if(shareInfo.getShareType().equals("PERFORMANCE_REPORT")){ @@ -544,7 +545,7 @@ public class ShareInfoService { private void millisCheck(long compareMillis, long millis,String shareInfoId) { if (compareMillis>millis) { shareInfoMapper.deleteByPrimaryKey(shareInfoId); - MSException.throwException("连接已失效,请重新获取!"); + MSException.throwException(Translator.get("connection_expired")); } } diff --git a/backend/src/main/resources/i18n/messages_en_US.properties b/backend/src/main/resources/i18n/messages_en_US.properties index f6b1170160..0e75e151a9 100644 --- a/backend/src/main/resources/i18n/messages_en_US.properties +++ b/backend/src/main/resources/i18n/messages_en_US.properties @@ -279,6 +279,7 @@ test_case_status_error=Error test_case_status_success=Success test_case_status_trash=Trash test_case_status_saved=Saved +connection_expired=The connection has expired, please get it again # track home api_case=Api performance_case=Performance diff --git a/backend/src/main/resources/i18n/messages_zh_CN.properties b/backend/src/main/resources/i18n/messages_zh_CN.properties index 0ed6591472..595a9c1308 100644 --- a/backend/src/main/resources/i18n/messages_zh_CN.properties +++ b/backend/src/main/resources/i18n/messages_zh_CN.properties @@ -274,6 +274,7 @@ group_permission=用户组与权限 test_case_status_prepare=未开始 test_case_status_running=进行中 test_case_status_finished=已完成 +connection_expired=连接已失效,请重新获取 # track home api_case=接口用例 performance_case=性能用例 diff --git a/backend/src/main/resources/i18n/messages_zh_TW.properties b/backend/src/main/resources/i18n/messages_zh_TW.properties index bc6af02f79..6c3924bb09 100644 --- a/backend/src/main/resources/i18n/messages_zh_TW.properties +++ b/backend/src/main/resources/i18n/messages_zh_TW.properties @@ -274,6 +274,7 @@ group_permission=用戶組與權限 test_case_status_prepare=未開始 test_case_status_running=進行中 test_case_status_finished=已完成 +connection_expired=連接已失效,請重新獲取 # track home api_case=接口用例 performance_case=性能用例 diff --git a/backend/src/main/resources/permission.json b/backend/src/main/resources/permission.json index d75bbe03d0..22fa9fc216 100644 --- a/backend/src/main/resources/permission.json +++ b/backend/src/main/resources/permission.json @@ -947,26 +947,22 @@ { "id": "PERSONAL_INFORMATION:READ+EDIT", "name": "permission.personal_information.personal_setting", - "resourceId": "PERSONAL_INFORMATION", - "license": true + "resourceId": "PERSONAL_INFORMATION" }, { "id": "PERSONAL_INFORMATION:READ+API_KEYS", "name": "permission.personal_information.api_keys", - "resourceId": "PERSONAL_INFORMATION", - "license": true + "resourceId": "PERSONAL_INFORMATION" }, { "id": "PERSONAL_INFORMATION:READ+EDIT_PASSWORD", "name": "permission.personal_information.edit_password", - "resourceId": "PERSONAL_INFORMATION", - "license": true + "resourceId": "PERSONAL_INFORMATION" }, { "id": "PERSONAL_INFORMATION:READ+THIRD_ACCOUNT", "name": "permission.personal_information.third_account", - "resourceId": "PERSONAL_INFORMATION", - "license": true + "resourceId": "PERSONAL_INFORMATION" } ], "resource": [ @@ -1127,8 +1123,7 @@ }, { "id": "PERSONAL_INFORMATION", - "name": "permission.personal_information.name", - "license": true + "name": "permission.personal_information.name" } ] } \ No newline at end of file