refactor(系统设置): 系统用户组权限列表成员查看权限

--bug=1028063 --user=宋昌昌 【系统设置】用户组与权限-只读用户无法点击成员查看 https://www.tapd.cn/55049933/s/1396529
This commit is contained in:
song-cc-rock 2023-07-24 15:10:09 +08:00 committed by fit2-zhao
parent 3dcd75ac8b
commit 5f97bc9ba3
2 changed files with 8 additions and 2 deletions

View File

@ -4,7 +4,7 @@
:destroy-on-close="true" @close="close" v-loading="loading" z-index="1000"
class="group-member">
<template v-slot:title>
<ms-table-header :condition.sync="condition" @create="addMemberBtn" @search="search"
<ms-table-header :condition.sync="condition" @create="addMemberBtn" @search="search" :create-permission="['SYSTEM_GROUP:READ+EDIT']"
:create-tip="$t('member.create')" :title="$t('commons.member')"/>
</template>
<el-table :border="true" class="adjust-table" :data="memberData" style="width: 100%;margin-top:5px;">
@ -41,6 +41,8 @@
<div>
<ms-table-operator :tip2="$t('commons.remove')"
:show-edit="showTypeLabel"
:edit-permission="['SYSTEM_GROUP:READ+EDIT']"
:delete-permission="['SYSTEM_GROUP:READ+EDIT']"
@editClick="editMemberBtn(scope.row)"
@deleteClick="removeMember(scope.row)"/>
</div>
@ -121,6 +123,7 @@ import {
import {getUserListByResourceUrl} from "../../../api/user";
import {getGroupResource} from "../../../api/workspace";
import {operationConfirm} from "metersphere-frontend/src/utils";
import {hasPermissions} from "metersphere-frontend/src/utils/permission";
export default {
name: "GroupMember",
@ -183,6 +186,9 @@ export default {
}
},
methods: {
hasPermissions(permission) {
return hasPermissions(permission[0]);
},
init() {
this.condition.userGroupId = this.group.id;
this.loading = getUserGroupByResourceUrlAndPage(this.initUserGroupUrl, this.currentPage, this.pageSize, this.condition)

View File

@ -136,7 +136,7 @@ export default {
return USER_GROUP_SCOPE;
},
disabledEditGroupMember() {
return !hasPermission('SYSTEM_GROUP:READ+EDIT');
return !hasPermission('SYSTEM_GROUP:READ');
}
},
methods: {