Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
48eafa2b
M
metersphere
项目概览
MeterSphere
/
metersphere
上一次同步 3 年多
通知
25
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
metersphere
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
48eafa2b
编写于
5月 27, 2020
作者:
C
chenjianxing
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev' of
https://github.com/metersphere/server
into dev
上级
30500115
37de2c2c
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
23 addition
and
14 deletion
+23
-14
backend/src/main/java/io/metersphere/controller/UserController.java
...c/main/java/io/metersphere/controller/UserController.java
+7
-1
backend/src/main/java/io/metersphere/service/UserService.java
...end/src/main/java/io/metersphere/service/UserService.java
+2
-6
backend/src/main/resources/i18n/messages_en_US.properties
backend/src/main/resources/i18n/messages_en_US.properties
+1
-0
backend/src/main/resources/i18n/messages_zh_CN.properties
backend/src/main/resources/i18n/messages_zh_CN.properties
+1
-0
backend/src/main/resources/i18n/messages_zh_TW.properties
backend/src/main/resources/i18n/messages_zh_TW.properties
+1
-0
frontend/src/business/components/settings/organization/OrganizationMember.vue
...s/components/settings/organization/OrganizationMember.vue
+1
-1
frontend/src/business/components/settings/system/User.vue
frontend/src/business/components/settings/system/User.vue
+1
-1
frontend/src/business/components/settings/workspace/WorkspaceMember.vue
...usiness/components/settings/workspace/WorkspaceMember.vue
+9
-5
未找到文件。
backend/src/main/java/io/metersphere/controller/UserController.java
浏览文件 @
48eafa2b
...
...
@@ -69,6 +69,12 @@ public class UserController {
userService
.
updateUserRole
(
user
);
}
@PostMapping
(
"/special/update_status"
)
@RequiresRoles
(
RoleConstants
.
ADMIN
)
public
void
updateStatus
(
@RequestBody
User
user
)
{
userService
.
updateUser
(
user
);
}
@PostMapping
(
"/special/ws/member/list/{goPage}/{pageSize}"
)
@RequiresRoles
(
RoleConstants
.
ADMIN
)
public
Pager
<
List
<
User
>>
getMemberListByAdmin
(
@PathVariable
int
goPage
,
@PathVariable
int
pageSize
,
@RequestBody
QueryMemberRequest
request
)
{
...
...
@@ -120,7 +126,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
();
}
...
...
backend/src/main/java/io/metersphere/service/UserService.java
浏览文件 @
48eafa2b
...
...
@@ -241,9 +241,7 @@ public class UserService {
userRoleExample
.
createCriteria
().
andUserIdEqualTo
(
userId
).
andSourceIdEqualTo
(
request
.
getWorkspaceId
());
List
<
UserRole
>
userRoles
=
userRoleMapper
.
selectByExample
(
userRoleExample
);
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
();
...
...
@@ -274,9 +272,7 @@ public class UserService {
userRoleExample
.
createCriteria
().
andUserIdEqualTo
(
userId
).
andSourceIdEqualTo
(
request
.
getOrganizationId
());
List
<
UserRole
>
userRoles
=
userRoleMapper
.
selectByExample
(
userRoleExample
);
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
();
...
...
backend/src/main/resources/i18n/messages_en_US.properties
浏览文件 @
48eafa2b
...
...
@@ -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=
...
...
backend/src/main/resources/i18n/messages_zh_CN.properties
浏览文件 @
48eafa2b
...
...
@@ -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
=
无法运行测试,未找到测试:
...
...
backend/src/main/resources/i18n/messages_zh_TW.properties
浏览文件 @
48eafa2b
...
...
@@ -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
=
無法運行測試,未找到測試:
...
...
frontend/src/business/components/settings/organization/OrganizationMember.vue
浏览文件 @
48eafa2b
...
...
@@ -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
=>
{
...
...
frontend/src/business/components/settings/system/User.vue
浏览文件 @
48eafa2b
...
...
@@ -489,7 +489,7 @@
this
.
btnAddRole
=
false
;
},
changeSwitch
(
row
)
{
this
.
$post
(
this
.
updatePath
,
row
,
()
=>
{
this
.
$post
(
'
/user/special/update_status
'
,
row
,
()
=>
{
this
.
$success
(
this
.
$t
(
'
commons.modify_success
'
));
})
},
...
...
frontend/src/business/components/settings/workspace/WorkspaceMember.vue
浏览文件 @
48eafa2b
...
...
@@ -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
;
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录