refactor(权限管理): 权限设置

This commit is contained in:
shiziyuan9527 2021-05-26 23:37:10 +08:00 committed by BugKing
parent 6caf0e7347
commit 3992b12f70
6 changed files with 22 additions and 11 deletions

View File

@ -204,7 +204,7 @@ VALUES (uuid(), 'org_admin', 'ORGANIZATION_SERVICE:READ+EDIT', 'ORGANIZATION_SER
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
VALUES (uuid(), 'org_admin', 'ORGANIZATION_GROUP:READ+DELETE', 'ORGANIZATION_GROUP');
insert into user_group_permission (id, group_id, permission_id, module_id)
values (uuid(), 'org_admin', 'ORGANIZATION_OPERATING_LOG:READ','ORGANIZATION_OPERATING_LOG');
values (uuid(), 'org_admin', 'ORGANIZATION_OPERATING_LOG:READ', 'ORGANIZATION_OPERATING_LOG');
-- 组织成员
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
@ -218,7 +218,7 @@ VALUES (uuid(), 'org_member', 'ORGANIZATION_MESSAGE:READ', 'ORGANIZATION_MESSAGE
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
VALUES (uuid(), 'org_member', 'ORGANIZATION_USER:READ', 'ORGANIZATION_USER');
insert into user_group_permission (id, group_id, permission_id, module_id)
values (uuid(), 'org_member', 'ORGANIZATION_OPERATING_LOG:READ','ORGANIZATION_OPERATING_LOG');
values (uuid(), 'org_member', 'ORGANIZATION_OPERATING_LOG:READ', 'ORGANIZATION_OPERATING_LOG');
-- 工作空间管理员
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
@ -421,7 +421,10 @@ values (uuid(), 'project_admin', 'PROJECT_TRACK_PLAN:READ+CASE_BATCH_EDIT', 'PRO
insert into user_group_permission (id, group_id, permission_id, module_id)
values (uuid(), 'project_admin', 'PROJECT_TRACK_PLAN:READ+CASE_BATCH_RUN', 'PROJECT_TRACK_PLAN');
insert into user_group_permission (id, group_id, permission_id, module_id)
values (uuid(), 'project_admin', 'PROJECT_TRACK_PLAN:READ+CASE_BATCH_DELETE','PROJECT_TRACK_PLAN');
values (uuid(), 'project_admin', 'PROJECT_TRACK_PLAN:READ+CASE_BATCH_DELETE', 'PROJECT_TRACK_PLAN');
insert into user_group_permission (id, group_id, permission_id, module_id)
values (uuid(), 'project_admin', 'PROJECT_TRACK_PLAN:READ+REPORT_DELETE','PROJECT_TRACK_PLAN');
-- 项目成员
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)
@ -563,7 +566,9 @@ values (uuid(), 'project_member', 'PROJECT_TRACK_PLAN:READ+CASE_BATCH_EDIT', 'PR
insert into user_group_permission (id, group_id, permission_id, module_id)
values (uuid(), 'project_member', 'PROJECT_TRACK_PLAN:READ+CASE_BATCH_RUN', 'PROJECT_TRACK_PLAN');
insert into user_group_permission (id, group_id, permission_id, module_id)
values (uuid(), 'project_member', 'PROJECT_TRACK_PLAN:READ+CASE_BATCH_DELETE','PROJECT_TRACK_PLAN');
values (uuid(), 'project_member', 'PROJECT_TRACK_PLAN:READ+CASE_BATCH_DELETE', 'PROJECT_TRACK_PLAN');
insert into user_group_permission (id, group_id, permission_id, module_id)
values (uuid(), 'project_member', 'PROJECT_TRACK_PLAN:READ+REPORT_DELETE','PROJECT_TRACK_PLAN');
-- 只读用户
INSERT INTO user_group_permission (id, group_id, permission_id, module_id)

View File

@ -529,6 +529,11 @@
"name": "关联/取消关联用例",
"resourceId": "PROJECT_TRACK_PLAN"
},
{
"id": "PROJECT_TRACK_PLAN:READ+REPORT_DELETE",
"name": "删除测试计划报告",
"resourceId": "PROJECT_TRACK_PLAN"
},
{
"id": "PROJECT_TRACK_PLAN:READ+CASE_BATCH_DELETE",
"name": "批量取消关联用例",
@ -853,11 +858,11 @@
},
{
"id": "PROJECT_PERFORMANCE_TEST",
"name": "测试"
"name": "性能测试"
},
{
"id": "PROJECT_PERFORMANCE_REPORT",
"name": "报告"
"name": "性能测试报告"
}
]
}

View File

@ -163,8 +163,8 @@
userIds: [
{required: true, message: this.$t('member.please_choose_member'), trigger: ['blur']}
],
roleIds: [
{required: true, message: this.$t('role.please_choose_role'), trigger: ['blur']}
groupIds: [
{required: true, message: "请选择用户组", trigger: ['blur']}
]
},
screenHeight: 'calc(100vh - 255px)',

View File

@ -64,7 +64,7 @@
</el-table-column>
<el-table-column
v-if="item.id == 'createUser'"
prop="createName"
prop="createUser"
:label="$t('commons.create_user')"
show-overflow-tooltip
:key="index"

View File

@ -56,7 +56,7 @@
<template v-slot:default="scope">
<ms-table-operator-button :tip="$t('test_track.plan_view.view_report')" icon="el-icon-document"
@exec="openReport(scope.row.id)"/>
<ms-table-operator-button type="danger" :tip="$t('commons.delete')" icon="el-icon-delete"
<ms-table-operator-button v-permission="['PROJECT_TRACK_PLAN:READ+REPORT_DELETE']" type="danger" :tip="$t('commons.delete')" icon="el-icon-delete"
@exec="handleDelete(scope.row)"/>
</template>
</el-table-column>
@ -124,7 +124,7 @@ export default {
{text: this.$t('test_track.plan.regression_test'), value: 'regression'},
],
buttons: [
{name: this.$t('api_test.definition.request.batch_delete'), handleClick: this.handleDeleteBatch},
{name: this.$t('api_test.definition.request.batch_delete'), handleClick: this.handleDeleteBatch, permission: ['PROJECT_TRACK_PLAN:READ+REPORT_DELETE']},
],
selectDataCounts: 0,
}

View File

@ -16,6 +16,7 @@
</div>
<div>
<el-input
v-permission="['PROJECT_TRACK_REVIEW:READ+COMMENT']"
ref="test"
type="textarea"
:placeholder="$t('test_track.comment.send_comment')"