fix: 系统用户组和项目用户组页面权限控制

This commit is contained in:
CaptainB 2021-11-15 15:30:10 +08:00 committed by 刘瑞斌
parent 7f5dbede2f
commit f9de1d0ed0
4 changed files with 31 additions and 22 deletions

View File

@ -1,19 +1,23 @@
CREATE TABLE `issue_follow` (
`issue_id` varchar(50) DEFAULT NULL,
`follow_id` varchar(50) DEFAULT NULL,
UNIQUE KEY `issue_follow_pk` (`issue_id`,`follow_id`),
KEY `issue_follow_follow_id_index` (`follow_id`),
KEY `issue_follow_issue_id_index` (`issue_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `issue_follow`
(
`issue_id` varchar(50) DEFAULT NULL,
`follow_id` varchar(50) DEFAULT NULL,
UNIQUE KEY `issue_follow_pk` (`issue_id`, `follow_id`),
KEY `issue_follow_follow_id_index` (`follow_id`),
KEY `issue_follow_issue_id_index` (`issue_id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4;
-- group
insert into user_group_permission (id, group_id, permission_id, module_id)
values (UUID(), 'project_group', 'PROJECT_GROUP:READ', 'PROJECT_GROUP');
insert into user_group_permission (id, group_id, permission_id, module_id)
values (UUID(), 'project_group', 'PROJECT_GROUP:READ+CREATE', 'PROJECT_GROUP');
insert into user_group_permission (id, group_id, permission_id, module_id)
values (UUID(), 'project_group', 'PROJECT_GROUP:READ+EDIT', 'PROJECT_GROUP');
insert into user_group_permission (id, group_id, permission_id, module_id)
values (UUID(), 'project_group', 'PROJECT_GROUP:READ+DELETE', 'PROJECT_GROUP');
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
VALUES (UUID(), 'project_group', 'PROJECT_GROUP:READ', 'PROJECT_GROUP');
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
VALUES (UUID(), 'project_group', 'PROJECT_GROUP:READ+CREATE', 'PROJECT_GROUP');
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
VALUES (UUID(), 'project_group', 'PROJECT_GROUP:READ+EDIT', 'PROJECT_GROUP');
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
VALUES (UUID(), 'project_group', 'PROJECT_GROUP:READ+DELETE', 'PROJECT_GROUP');
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
VALUES (UUID(), 'project_group', 'PROJECT_GROUP:READ+SETTING_PERMISSION', 'PROJECT_GROUP');

View File

@ -305,6 +305,11 @@
"name": "删除用户组与权限",
"resourceId": "PROJECT_GROUP"
},
{
"id": "PROJECT_GROUP:READ+SETTING_PERMISSION",
"name": "设置权限",
"resourceId": "PROJECT_GROUP"
},
{
"id": "PROJECT_MANAGER:READ",
"name": "查询项目",

View File

@ -45,13 +45,13 @@
<el-table-column :label="$t('commons.operating')" min-width="120">
<template v-slot:default="scope">
<div>
<ms-table-operator :edit-permission="['SYSTEM_GROUP:READ+EDIT', 'ORGANIZATION_GROUP:READ+EDIT']"
:delete-permission="['SYSTEM_GROUP:READ+DELETE', 'ORGANIZATION_GROUP:READ+DELETE']"
<ms-table-operator :edit-permission="['PROJECT_GROUP:READ+EDIT']"
:delete-permission="['PROJECT_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', 'ORGANIZATION_GROUP:READ+SETTING_PERMISSION']"
v-permission="['PROJECT_GROUP:READ+SETTING_PERMISSION']"
:tip="$t('group.set_permission')" icon="el-icon-s-tools" @exec="setPermission(scope.row)"/>
</template>
</ms-table-operator>

View File

@ -2,7 +2,7 @@
<div v-loading="result.loading">
<el-card>
<template v-slot:header>
<ms-table-header :create-permission="['SYSTEM_GROUP:READ+CREATE','ORGANIZATION_GROUP:READ+CREATE']"
<ms-table-header :create-permission="['SYSTEM_GROUP:READ+CREATE']"
:condition.sync="condition" @search="initData" @create="create"
:create-tip="$t('group.create')" :title="$t('group.group_permission')"/>
</template>
@ -43,13 +43,13 @@
<el-table-column :label="$t('commons.operating')" min-width="120">
<template v-slot:default="scope">
<div>
<ms-table-operator :edit-permission="['SYSTEM_GROUP:READ+EDIT', 'ORGANIZATION_GROUP:READ+EDIT']"
:delete-permission="['SYSTEM_GROUP:READ+DELETE', 'ORGANIZATION_GROUP:READ+DELETE']"
<ms-table-operator :edit-permission="['SYSTEM_GROUP:READ+EDIT']"
:delete-permission="['SYSTEM_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', 'ORGANIZATION_GROUP:READ+SETTING_PERMISSION']"
v-permission="['SYSTEM_GROUP:READ+SETTING_PERMISSION']"
:tip="$t('group.set_permission')" icon="el-icon-s-tools" @exec="setPermission(scope.row)"/>
</template>
</ms-table-operator>