Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
q4speed 2020-06-04 15:13:55 +08:00
commit 430c15f742
10 changed files with 37 additions and 13 deletions

View File

@ -2,6 +2,8 @@ FROM registry.fit2cloud.com/metersphere/fabric8-java-alpine-openjdk8-jre
MAINTAINER FIT2CLOUD <support@fit2cloud.com>
ARG MS_VERSION=dev
RUN mkdir -p /opt/apps && mkdir -p /opt/jmeter
ADD backend/target/backend-1.0.jar /opt/apps
@ -12,5 +14,7 @@ ENV JAVA_APP_JAR=/opt/apps/backend-1.0.jar
ENV AB_OFF=true
ENV MS_VERSION=${MS_VERSION}
ENV JAVA_OPTIONS="-Dfile.encoding=utf-8 -Djava.awt.headless=true"
CMD ["/deployments/run-java.sh"]

View File

@ -5,6 +5,7 @@ import io.metersphere.base.domain.Role;
import io.metersphere.commons.user.SessionUser;
import io.metersphere.commons.utils.SessionUtils;
import io.metersphere.dto.UserDTO;
import io.metersphere.i18n.Translator;
import io.metersphere.service.UserService;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authc.*;
@ -67,7 +68,7 @@ public class ShiroDBRealm extends AuthorizingRealm {
UserDTO user = userService.getUserDTO(userId);
String msg;
if (user == null) {
msg = "The user does not exist: " + userId;
msg = Translator.get("user_not_exist") + userId;
logger.warn(msg);
throw new UnknownAccountException(msg);
}
@ -79,7 +80,7 @@ public class ShiroDBRealm extends AuthorizingRealm {
}
// 密码验证
if (!userService.checkUserPassword(userId, password)) {
throw new IncorrectCredentialsException("The password is incorrect");
throw new IncorrectCredentialsException(Translator.get("password_is_incorrect"));
}
//
SessionUser sessionUser = SessionUser.fromUser(user);

View File

@ -12,7 +12,7 @@ user_name_is_null=User name cannot be null
user_email_is_null=User email cannot be null
password_is_null=Password cannot be null
user_id_already_exists=User ID already exists
password_modification_failed=Password modification failed
password_modification_failed=The old password is wrong. Please re-enter it
cannot_delete_current_user=Cannot delete the user currently logged in
user_already_exists=The user already exists in the current member list
#load test
@ -96,4 +96,8 @@ please_input_workspace_member=Please input workspace merber
test_case_report_template_repeat=The workspace has the same name template
plan_name_already_exists=Test plan name already exists
test_case_already_exists_excel=There are duplicate test cases in the import file
api_test_name_already_exists=Test name already exists
api_test_name_already_exists=Test name already exists
password_is_incorrect=Incorrect password
user_not_exist=user does not exist
user_has_been_disabled=the user has been disabled.
excessive_attempts=Excessive attempts

View File

@ -11,10 +11,11 @@ user_name_is_null=用户名不能为空
user_email_is_null=用户邮箱不能为空
password_is_null=密码不能为空
user_id_already_exists=用户id已存在
password_modification_failed=密码修改失败
password_modification_failed=旧密码输入错误,请重新输入
cannot_delete_current_user=无法删除当前登录用户
connection_failed=连接失败
user_already_exists=该用户已存在于当前成员列表中
#load test
edit_load_test_not_found=无法编辑测试,未找到测试:
run_load_test_not_found=无法运行测试,未找到测试:
@ -97,3 +98,10 @@ test_case_report_template_repeat=同一工作空间下不能存在同名模版
plan_name_already_exists=测试计划名称已存在
test_case_already_exists_excel=导入文件中存在重复用例
api_test_name_already_exists=测试名称已经存在
login_fail=登陆失败
password_is_incorrect=密码不正确
user_not_exist=用户不存在:
user_has_been_disabled=用户已被禁用
excessive_attempts=操作频繁
user_has_been_locked

View File

@ -12,7 +12,7 @@ user_name_is_null=用戶名不能為空
user_email_is_null=用戶郵箱不能為空
password_is_null=密碼不能為空
user_id_already_exists=用戶id已存在
password_modification_failed=密碼修改失敗
password_modification_failed=舊密碼輸入錯誤,請重新輸入
cannot_delete_current_user=無法刪除當前登錄用戶
user_already_exists=該用戶已存在於當前成員列表中
#load test
@ -96,4 +96,8 @@ please_input_workspace_member=請填寫該工作空間相關人員
test_case_report_template_repeat=同壹工作空間下不能存在同名模版
plan_name_already_exists=測試計劃名稱已存在
test_case_already_exists_excel=導入文件中存在重復用例
api_test_name_already_exists=測試名稱已經存在
api_test_name_already_exists=測試名稱已經存在
password_is_incorrect=密碼不正確
user_not_exist=用戶不存在:
user_has_been_disabled.=用戶已被禁用
excessive_attempts=操作頻繁

View File

@ -59,7 +59,7 @@
<!--Change personal password-->
<el-dialog :title="$t('member.edit_password')" :visible.sync="editPasswordVisible" width="30%" left>
<el-form :model="ruleForm" :rules="rules" ref="editPasswordForm" label-width="120px" class="demo-ruleForm">
<el-form-item :label="$t('member.old_password')" prop="password">
<el-form-item :label="$t('member.old_password')" prop="password" style="margin-bottom: 29px">
<el-input v-model="ruleForm.password" autocomplete="off" show-password/>
</el-form-item>
<el-form-item :label="$t('member.new_password')" prop="newpassword">

View File

@ -53,19 +53,19 @@
:destroy-on-close="true">
<el-form :model="form" label-position="right" label-width="120px" size="small" :rules="rule" ref="createUserForm">
<el-form-item label="ID" prop="id">
<el-input v-model="form.id" autocomplete="off"/>
<el-input v-model="form.id" autocomplete="off" :placeholder="$t('user.input_id')"/>
</el-form-item>
<el-form-item :label="$t('commons.username')" prop="name">
<el-input v-model="form.name" autocomplete="off"/>
<el-input v-model="form.name" autocomplete="off" :placeholder="$t('user.input_name')"/>
</el-form-item>
<el-form-item :label="$t('commons.email')" prop="email">
<el-input v-model="form.email" autocomplete="off"/>
<el-input v-model="form.email" autocomplete="off" :placeholder="$t('user.input_email')"/>
</el-form-item>
<el-form-item :label="$t('commons.phone')" prop="phone">
<el-input v-model="form.phone" autocomplete="off"/>
<el-input v-model="form.phone" autocomplete="off" :placeholder="$t('user.input_phone')"/>
</el-form-item>
<el-form-item :label="$t('commons.password')" prop="password">
<el-input v-model="form.password" autocomplete="off" show-password/>
<el-input v-model="form.password" autocomplete="new-password" show-password :placeholder="$t('user.input_password')"/>
</el-form-item>
<div v-for="(role, index) in form.roles" :key="index">
<el-form-item :label="$t('commons.role')+index"

View File

@ -163,6 +163,7 @@ export default {
'input_id': 'Please enter a ID',
'input_email': 'Please enter a email',
'input_password': 'Please enter a password',
'input_phone': 'Please enter phone number',
'special_characters_are_not_supported': 'Special characters are not supported',
'mobile_number_format_is_incorrect': 'Mobile number format is incorrect',
'email_format_is_incorrect': 'Email format is incorrect',

View File

@ -161,6 +161,7 @@ export default {
'input_id': '请输入ID',
'input_email': '请输入邮箱',
'input_password': '请输入密码',
'input_phone': '请输入电话号码',
'special_characters_are_not_supported': '不支持特殊字符',
'mobile_number_format_is_incorrect': '手机号码格式不正确',
'email_format_is_incorrect': '邮箱格式不正确',

View File

@ -160,6 +160,7 @@ export default {
'input_id': '請輸入ID',
'input_email': '請輸入郵箱',
'input_password': '請輸入密碼',
'input_phone': '請輸入電話號碼',
'special_characters_are_not_supported': '不支持特殊字符',
'mobile_number_format_is_incorrect': '手機號碼格式不正確',
'email_format_is_incorrect': '郵箱格式不正確',