From 48e22f8595d4101203e8c7dea74b5af3adf472b1 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Fri, 27 May 2022 19:06:25 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B=E6=89=B9=E9=87=8F=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E6=9D=83=E9=99=90=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1012168 --user=李玉号 【权限配置】【功能用例】缺少批量操作的权限控制 https://www.tapd.cn/55049933/s/1167063 --- backend/src/main/resources/permission.json | 37 +++++++++++++++++++ .../track/case/components/TestCaseList.vue | 20 +++++----- 2 files changed, 47 insertions(+), 10 deletions(-) diff --git a/backend/src/main/resources/permission.json b/backend/src/main/resources/permission.json index 1052ac42d3..d5eab8b6ee 100644 --- a/backend/src/main/resources/permission.json +++ b/backend/src/main/resources/permission.json @@ -482,6 +482,43 @@ "name": "permission.project_track_case.recover", "resourceId": "PROJECT_TRACK_CASE" }, + { + "id": "PROJECT_TRACK_CASE:READ+BATCH_EDIT", + "name": "test_track.case.batch_edit_case", + "resourceId": "PROJECT_TRACK_CASE" + }, + { + "id": "PROJECT_TRACK_CASE:READ+BATCH_MOVE", + "name": "test_track.case.batch_move_case", + "resourceId": "PROJECT_TRACK_CASE" + }, + { + "id": "PROJECT_TRACK_CASE:READ+BATCH_COPY", + "name": "api_test.batch_copy", + "resourceId": "PROJECT_TRACK_CASE" + }, + { + "id": "PROJECT_TRACK_CASE:READ+BATCH_DELETE", + "name": "test_track.case.batch_delete_case", + "resourceId": "PROJECT_TRACK_CASE" + }, + { + "id": "PROJECT_TRACK_CASE:READ+BATCH_REDUCTION", + "name": "commons.batch_restore", + "resourceId": "PROJECT_TRACK_CASE" + }, + { + "id": "PROJECT_TRACK_CASE:READ+GENERATE_DEPENDENCIES", + "name": "test_track.case.generate_dependencies", + "resourceId": "PROJECT_TRACK_CASE", + "license": true + }, + { + "id": "PROJECT_TRACK_CASE:READ+BATCH_ADD_PUBLIC", + "name": "test_track.case.batch_add_public", + "resourceId": "PROJECT_TRACK_CASE", + "license": true + }, { "id": "PROJECT_TRACK_REVIEW:READ", "name": "permission.project_track_review.read", diff --git a/frontend/src/business/components/track/case/components/TestCaseList.vue b/frontend/src/business/components/track/case/components/TestCaseList.vue index 04bd48cfea..7ad047e1a4 100644 --- a/frontend/src/business/components/track/case/components/TestCaseList.vue +++ b/frontend/src/business/components/track/case/components/TestCaseList.vue @@ -367,56 +367,56 @@ export default { { name: this.$t('test_track.case.batch_edit_case'), handleClick: this.handleBatchEdit, - permissions: ['PROJECT_TRACK_CASE:READ+EDIT'] + permissions: ['PROJECT_TRACK_CASE:READ+BATCH_EDIT'] }, { name: this.$t('test_track.case.batch_move_case'), handleClick: this.handleBatchMove, - permissions: ['PROJECT_TRACK_CASE:READ+EDIT'] + permissions: ['PROJECT_TRACK_CASE:READ+BATCH_MOVE'] }, { name: this.$t('api_test.batch_copy'), handleClick: this.handleBatchCopy, - permissions: ['PROJECT_TRACK_CASE:READ+COPY'] + permissions: ['PROJECT_TRACK_CASE:READ+BATCH_COPY'] }, { name: this.$t('test_track.case.batch_delete_case'), handleClick: this.handleDeleteBatchToGc, - permissions: ['PROJECT_TRACK_CASE:READ+DELETE'] + permissions: ['PROJECT_TRACK_CASE:READ+BATCH_DELETE'] }, { name: this.$t('test_track.case.generate_dependencies'), isXPack: true, handleClick: this.generateGraph, - permissions: ['PROJECT_API_DEFINITION:READ+EDIT_API'] + permissions: ['PROJECT_TRACK_CASE:READ+GENERATE_DEPENDENCIES'] }, { name: this.$t('test_track.case.batch_add_public'), isXPack: true, handleClick: this.handleBatchAddPublic, - permissions: ['PROJECT_API_DEFINITION:READ+EDIT_API'], + permissions: ['PROJECT_TRACK_CASE:READ+BATCH_ADD_PUBLIC'], } ], publicButtons: [ { name: this.$t('test_track.case.batch_copy'), handleClick: this.handleBatchMove, - permissions: ['PROJECT_TRACK_CASE:READ+EDIT'] + permissions: ['PROJECT_TRACK_CASE:READ+BATCH_COPY'] }, { name: this.$t('test_track.case.batch_delete_case'), handleClick: this.handleDeleteBatchToPublic, - permissions: ['PROJECT_TRACK_CASE:READ+DELETE'], + permissions: ['PROJECT_TRACK_CASE:READ+BATCH_DELETE'], }, ], trashButtons: [ { name: this.$t('commons.reduction'), handleClick: this.batchReduction, - permissions: ['PROJECT_TRACK_CASE:READ+RECOVER'] + permissions: ['PROJECT_TRACK_CASE:READ+BATCH_REDUCTION'] }, { name: this.$t('test_track.case.batch_delete_case'), handleClick: this.handleDeleteBatch, - permissions: ['PROJECT_TRACK_CASE:READ+DELETE'] + permissions: ['PROJECT_TRACK_CASE:READ+BATCH_DELETE'] } ], operators: [],