Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
a9c395cc
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,体验更适合开发者的 AI 搜索 >>
提交
a9c395cc
编写于
5月 25, 2021
作者:
S
shiziyuan9527
提交者:
刘瑞斌
5月 25, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(用户组和权限): 用户组修改
上级
a3fd15fd
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
22 addition
and
6 deletion
+22
-6
backend/src/main/java/io/metersphere/service/GroupService.java
...nd/src/main/java/io/metersphere/service/GroupService.java
+6
-0
frontend/src/business/components/settings/system/group/EditUserGroup.vue
...siness/components/settings/system/group/EditUserGroup.vue
+6
-4
frontend/src/business/components/settings/system/group/UserGroup.vue
...c/business/components/settings/system/group/UserGroup.vue
+10
-2
未找到文件。
backend/src/main/java/io/metersphere/service/GroupService.java
浏览文件 @
a9c395cc
...
...
@@ -107,6 +107,9 @@ public class GroupService {
}
public
void
editGroup
(
EditGroupRequest
request
)
{
if
(
StringUtils
.
equals
(
request
.
getId
(),
"admin"
))
{
MSException
.
throwException
(
"系统管理员无法编辑!"
);
}
checkGroupExist
(
request
);
Group
group
=
new
Group
();
request
.
setScopeId
(
null
);
...
...
@@ -116,6 +119,9 @@ public class GroupService {
}
public
void
deleteGroup
(
String
id
)
{
if
(
StringUtils
.
equals
(
id
,
"admin"
))
{
MSException
.
throwException
(
"系统管理员无法删除!"
);
}
groupMapper
.
deleteByPrimaryKey
(
id
);
UserGroupPermissionExample
example
=
new
UserGroupPermissionExample
();
example
.
createCriteria
().
andGroupIdEqualTo
(
id
);
...
...
frontend/src/business/components/settings/system/group/EditUserGroup.vue
浏览文件 @
a9c395cc
<
template
>
<el-dialog
:close-on-click-modal=
"false"
:visible.sync=
"dialogVisible"
width=
"50%"
:title=
"
dialogT
itle"
:title=
"
t
itle"
:destroy-on-close=
"true"
>
<el-form
ref=
"form"
:model=
"form"
label-width=
"auto"
size=
"small"
:rules=
"rules"
>
<el-row>
...
...
@@ -11,7 +11,7 @@
</el-col>
<el-col
:span=
"11"
:offset=
"2"
>
<el-form-item
label=
"所属类型"
prop=
"type"
>
<el-select
v-model=
"form.type"
placeholder=
"请选择所属类型"
style=
"width: 100%"
@
change=
"changeGroup"
>
<el-select
v-model=
"form.type"
placeholder=
"请选择所属类型"
style=
"width: 100%"
@
change=
"changeGroup"
:disabled=
"dialogType === 'edit'"
>
<el-option
label=
"系统"
value=
"SYSTEM"
></el-option>
<el-option
label=
"组织"
value=
"ORGANIZATION"
></el-option>
<el-option
label=
"工作空间"
value=
"WORKSPACE"
></el-option>
...
...
@@ -70,7 +70,8 @@ export default {
dialogType
:
''
,
isSystem
:
false
,
show
:
true
,
organizations
:
[]
organizations
:
[],
title
:
'
创建用户组
'
}
},
props
:
{
...
...
@@ -117,7 +118,8 @@ export default {
this
.
dialogVisible
=
false
;
})
},
open
(
row
,
type
)
{
open
(
row
,
type
,
title
)
{
this
.
title
=
title
;
this
.
isSystem
=
false
;
this
.
show
=
true
;
this
.
dialogVisible
=
true
;
...
...
frontend/src/business/components/settings/system/group/UserGroup.vue
浏览文件 @
a9c395cc
...
...
@@ -102,10 +102,14 @@ export default {
});
},
create
()
{
this
.
$refs
.
editUserGroup
.
open
({},
'
create
'
);
this
.
$refs
.
editUserGroup
.
open
({},
'
create
'
,
'
创建用户组
'
);
},
edit
(
row
)
{
this
.
$refs
.
editUserGroup
.
open
(
row
,
'
edit
'
);
if
(
row
.
id
===
"
admin
"
)
{
this
.
$warning
(
"
系统管理员不支持编辑!
"
);
return
;
}
this
.
$refs
.
editUserGroup
.
open
(
row
,
'
edit
'
,
'
编辑用户组
'
);
},
_handleDel
(
row
)
{
this
.
result
=
this
.
$get
(
"
/user/group/delete/
"
+
row
.
id
,
()
=>
{
...
...
@@ -114,6 +118,10 @@ export default {
});
},
del
(
row
)
{
if
(
row
.
id
===
"
admin
"
)
{
this
.
$warning
(
"
系统管理员不支持删除!
"
);
return
;
}
this
.
$refs
.
deleteConfirm
.
open
(
row
);
},
copy
(
row
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录