管理员添加成员时提示问题
This commit is contained in:
parent
660035b1a8
commit
ab23a3d5f3
|
@ -120,7 +120,7 @@ public class UserController {
|
|||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@RequiresRoles(value = {RoleConstants.ADMIN, RoleConstants.ORG_ADMIN}, logical = Logical.OR)
|
||||
@RequiresRoles(value = {RoleConstants.ADMIN, RoleConstants.ORG_ADMIN, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
|
||||
public List<User> getUserList() {
|
||||
return userService.getUserList();
|
||||
}
|
||||
|
|
|
@ -243,7 +243,7 @@ public class UserService {
|
|||
if (userRoles.size() > 0) {
|
||||
User user = userMapper.selectByPrimaryKey(userId);
|
||||
String username = user.getName();
|
||||
MSException.throwException("The user [" + username + "] already exists in the current workspace!");
|
||||
MSException.throwException(Translator.get("user_already_exists"));
|
||||
} else {
|
||||
for (String roleId : request.getRoleIds()) {
|
||||
UserRole userRole = new UserRole();
|
||||
|
@ -276,7 +276,7 @@ public class UserService {
|
|||
if (userRoles.size() > 0) {
|
||||
User user = userMapper.selectByPrimaryKey(userId);
|
||||
String username = user.getName();
|
||||
MSException.throwException("The user [" + username + "] already exists in the current organization!");
|
||||
MSException.throwException(Translator.get("user_already_exists"));
|
||||
} else {
|
||||
for (String roleId : request.getRoleIds()) {
|
||||
UserRole userRole = new UserRole();
|
||||
|
|
|
@ -14,6 +14,7 @@ password_is_null=Password cannot be null
|
|||
user_id_already_exists=User ID already exists
|
||||
password_modification_failed=Password modification failed
|
||||
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
|
||||
edit_load_test_not_found=Cannot edit test, test not found=
|
||||
run_load_test_not_found=Cannot run test, test not found=
|
||||
|
|
|
@ -14,6 +14,7 @@ user_id_already_exists=用户id已存在
|
|||
password_modification_failed=密码修改失败
|
||||
cannot_delete_current_user=无法删除当前登录用户
|
||||
connection_failed=连接失败
|
||||
user_already_exists=该用户已存在于当前成员列表中
|
||||
#load test
|
||||
edit_load_test_not_found=无法编辑测试,未找到测试:
|
||||
run_load_test_not_found=无法运行测试,未找到测试:
|
||||
|
|
|
@ -14,6 +14,7 @@ password_is_null=密碼不能為空
|
|||
user_id_already_exists=用戶id已存在
|
||||
password_modification_failed=密碼修改失敗
|
||||
cannot_delete_current_user=無法刪除當前登錄用戶
|
||||
user_already_exists=該用戶已存在於當前成員列表中
|
||||
#load test
|
||||
edit_load_test_not_found=無法編輯測試,未找到測試:
|
||||
run_load_test_not_found=無法運行測試,未找到測試:
|
||||
|
|
|
@ -212,7 +212,7 @@
|
|||
}
|
||||
this.form = {};
|
||||
this.createVisible = true;
|
||||
this.result = this.$get('/user/besideorg/list/' + this.currentUser().lastOrganizationId, response => {
|
||||
this.result = this.$get('/user/list/', response => {
|
||||
this.userList = response.data;
|
||||
});
|
||||
this.result = this.$get('/role/list/org', response => {
|
||||
|
|
|
@ -214,16 +214,20 @@
|
|||
},
|
||||
create() {
|
||||
this.form = {};
|
||||
let param = {
|
||||
name: this.condition.name,
|
||||
organizationId: this.currentUser().lastOrganizationId
|
||||
};
|
||||
// let param = {
|
||||
// name: this.condition.name,
|
||||
// organizationId: this.currentUser().lastOrganizationId
|
||||
// };
|
||||
let wsId = this.currentUser().lastWorkspaceId;
|
||||
if (typeof wsId == "undefined" || wsId == null || wsId == "") {
|
||||
this.$warning(this.$t('workspace.please_select_a_workspace_first'));
|
||||
return false;
|
||||
}
|
||||
this.$post('/user/org/member/list/all', param, response => {
|
||||
// this.$post('/user/org/member/list/all', param, response => {
|
||||
// this.createVisible = true;
|
||||
// this.userList = response.data;
|
||||
// })
|
||||
this.$get('/user/list/', response => {
|
||||
this.createVisible = true;
|
||||
this.userList = response.data;
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue