refactor(权限管理): 权限设置
This commit is contained in:
parent
74df23093e
commit
5507e63af7
|
@ -162,6 +162,9 @@ INSERT INTO `user_group_permission` (`id`, `group_id`, `permission_id`, `module_
|
|||
VALUES (uuid(), 'admin', 'SYSTEM_TEST_POOL:READ', 'SYSTEM_TEST_POOL');
|
||||
INSERT INTO `user_group_permission` (`id`, `group_id`, `permission_id`, `module_id`)
|
||||
VALUES (uuid(), 'admin', 'SYSTEM_TEST_POOL:READ+EDIT', 'SYSTEM_TEST_POOL');
|
||||
insert into metersphere_dev.user_group_permission (id, group_id, permission_id, module_id)
|
||||
values (uuid(), 'admin', 'SYSTEM_OPERATING_LOG:READ', 'SYSTEM_OPERATING_LOG');
|
||||
|
||||
|
||||
-- 组织管理员
|
||||
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
|
||||
|
@ -241,15 +244,15 @@ values (uuid(), 'ws_admin', 'WORKSPACE_PROJECT_MANAGER:READ+DELETE', 'WORKSPACE_
|
|||
insert into user_group_permission (id, group_id, permission_id, module_id)
|
||||
values (uuid(), 'ws_admin', 'WORKSPACE_PROJECT_MANAGER:READ+EDIT', 'WORKSPACE_PROJECT_MANAGER');
|
||||
insert into user_group_permission (id, group_id, permission_id, module_id)
|
||||
values (uuid(), 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ','WORKSPACE_PROJECT_ENVIRONMENT');
|
||||
values (uuid(), 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ', 'WORKSPACE_PROJECT_ENVIRONMENT');
|
||||
insert into user_group_permission (id, group_id, permission_id, module_id)
|
||||
values (uuid(), 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+COPY','WORKSPACE_PROJECT_ENVIRONMENT');
|
||||
values (uuid(), 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+COPY', 'WORKSPACE_PROJECT_ENVIRONMENT');
|
||||
insert into user_group_permission (id, group_id, permission_id, module_id)
|
||||
values (uuid(), 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+CREATE','WORKSPACE_PROJECT_ENVIRONMENT');
|
||||
values (uuid(), 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+CREATE', 'WORKSPACE_PROJECT_ENVIRONMENT');
|
||||
insert into user_group_permission (id, group_id, permission_id, module_id)
|
||||
values (uuid(), 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+IMPORT','WORKSPACE_PROJECT_ENVIRONMENT');
|
||||
values (uuid(), 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+IMPORT', 'WORKSPACE_PROJECT_ENVIRONMENT');
|
||||
insert into user_group_permission (id, group_id, permission_id, module_id)
|
||||
values (uuid(), 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+EXPORT','WORKSPACE_PROJECT_ENVIRONMENT');
|
||||
values (uuid(), 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+EXPORT', 'WORKSPACE_PROJECT_ENVIRONMENT');
|
||||
insert into user_group_permission (id, group_id, permission_id, module_id)
|
||||
values (uuid(), 'ws_admin', 'WORKSPACE_PROJECT_ENVIRONMENT:READ+EDIT', 'WORKSPACE_PROJECT_ENVIRONMENT');
|
||||
insert into user_group_permission (id, group_id, permission_id, module_id)
|
||||
|
|
|
@ -149,6 +149,11 @@
|
|||
"name": "编辑",
|
||||
"resourceId": "SYSTEM_AUTH"
|
||||
},
|
||||
{
|
||||
"id": "SYSTEM_OPERATING_LOG:READ",
|
||||
"name": "查询操作日志",
|
||||
"resourceId": "SYSTEM_OPERATING_LOG"
|
||||
},
|
||||
{
|
||||
"id": "ORGANIZATION_USER:READ",
|
||||
"name": "查询成员",
|
||||
|
@ -728,6 +733,10 @@
|
|||
"id": "SYSTEM_AUTH",
|
||||
"name": "授权管理"
|
||||
},
|
||||
{
|
||||
"id": "SYSTEM_OPERATING_LOG",
|
||||
"name": "操作日志"
|
||||
},
|
||||
{
|
||||
"id": "ORGANIZATION_USER",
|
||||
"name": "成员"
|
||||
|
|
|
@ -288,7 +288,7 @@
|
|||
})
|
||||
},
|
||||
del(row) {
|
||||
this.$confirm(this.$t('member.org_remove_member'), '', {
|
||||
this.$confirm(this.$t('member.remove_member'), '', {
|
||||
confirmButtonText: this.$t('commons.confirm'),
|
||||
cancelButtonText: this.$t('commons.cancel'),
|
||||
type: 'warning'
|
||||
|
|
|
@ -131,7 +131,7 @@ export default {
|
|||
{
|
||||
path: 'operatingLog',
|
||||
component: () => import('@/business/components/settings/operatinglog/OperatingLog'),
|
||||
meta: {system: true, title: 'operating_log.title'}
|
||||
meta: {system: true, title: 'operating_log.title', permissions: ['SYSTEM_OPERATING_LOG:READ']}
|
||||
}
|
||||
|
||||
]
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<div v-loading="result.loading">
|
||||
<el-card>
|
||||
<template v-slot:header>
|
||||
<ms-table-header :create-permission="['SYSTEM_GROUP:READ+CREATE']" :condition.sync="condition" @search="initData" @create="create"
|
||||
create-tip="创建用户组" title="用户组与权限"/>
|
||||
<ms-table-header :create-permission="['SYSTEM_GROUP:READ+CREATE','ORGANIZATION_GROUP:READ+CREATE']" :condition.sync="condition" @search="initData" @create="create"
|
||||
create-tip="创建用户组" title="用户组与权限" :have-search="false"/>
|
||||
</template>
|
||||
|
||||
<el-table :data="groups" border class="adjust-table" style="width: 100%"
|
||||
|
@ -29,12 +29,12 @@
|
|||
<el-table-column prop="description" label="描述"/>
|
||||
<el-table-column :label="$t('commons.operating')" min-width="120">
|
||||
<template v-slot:default="scope">
|
||||
<ms-table-operator :edit-permission="['SYSTEM_GROUP:READ+EDIT']"
|
||||
:delete-permission="['SYSTEM_GROUP:READ+DELETE']"
|
||||
<ms-table-operator :edit-permission="['SYSTEM_GROUP:READ+EDIT', 'ORGANIZATION_GROUP:READ+EDIT']"
|
||||
:delete-permission="['SYSTEM_GROUP:READ+DELETE', 'ORGANIZATION_GROUP:READ+DELETE']"
|
||||
@editClick="edit(scope.row)" @deleteClick="del(scope.row)">
|
||||
<template v-slot:middle>
|
||||
<!-- <ms-table-operator-button tip="复制" icon="el-icon-document-copy" @exec="copy(scope.row)"/>-->
|
||||
<ms-table-operator-button v-permission="['SYSTEM_GROUP:READ+SETTING_PERMISSION']" tip="设置权限" icon="el-icon-s-tools" @exec="setPermission(scope.row)"/>
|
||||
<ms-table-operator-button v-permission="['SYSTEM_GROUP:READ+SETTING_PERMISSION', 'ORGANIZATION_GROUP:READ+SETTING_PERMISSION']" tip="设置权限" icon="el-icon-s-tools" @exec="setPermission(scope.row)"/>
|
||||
</template>
|
||||
</ms-table-operator>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue