fix(测试跟踪): 测试用例批量操作权限控制

--bug=1012168 --user=李玉号 【权限配置】【功能用例】缺少批量操作的权限控制
https://www.tapd.cn/55049933/s/1167063
This commit is contained in:
shiziyuan9527 2022-05-27 19:06:25 +08:00 committed by 刘瑞斌
parent f887d8a39d
commit 48e22f8595
2 changed files with 47 additions and 10 deletions

View File

@ -482,6 +482,43 @@
"name": "permission.project_track_case.recover", "name": "permission.project_track_case.recover",
"resourceId": "PROJECT_TRACK_CASE" "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", "id": "PROJECT_TRACK_REVIEW:READ",
"name": "permission.project_track_review.read", "name": "permission.project_track_review.read",

View File

@ -367,56 +367,56 @@ export default {
{ {
name: this.$t('test_track.case.batch_edit_case'), name: this.$t('test_track.case.batch_edit_case'),
handleClick: this.handleBatchEdit, 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'), name: this.$t('test_track.case.batch_move_case'),
handleClick: this.handleBatchMove, handleClick: this.handleBatchMove,
permissions: ['PROJECT_TRACK_CASE:READ+EDIT'] permissions: ['PROJECT_TRACK_CASE:READ+BATCH_MOVE']
}, },
{ {
name: this.$t('api_test.batch_copy'), name: this.$t('api_test.batch_copy'),
handleClick: this.handleBatchCopy, 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'), name: this.$t('test_track.case.batch_delete_case'),
handleClick: this.handleDeleteBatchToGc, handleClick: this.handleDeleteBatchToGc,
permissions: ['PROJECT_TRACK_CASE:READ+DELETE'] permissions: ['PROJECT_TRACK_CASE:READ+BATCH_DELETE']
}, },
{ {
name: this.$t('test_track.case.generate_dependencies'), name: this.$t('test_track.case.generate_dependencies'),
isXPack: true, isXPack: true,
handleClick: this.generateGraph, 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'), name: this.$t('test_track.case.batch_add_public'),
isXPack: true, isXPack: true,
handleClick: this.handleBatchAddPublic, handleClick: this.handleBatchAddPublic,
permissions: ['PROJECT_API_DEFINITION:READ+EDIT_API'], permissions: ['PROJECT_TRACK_CASE:READ+BATCH_ADD_PUBLIC'],
} }
], ],
publicButtons: [ publicButtons: [
{ {
name: this.$t('test_track.case.batch_copy'), name: this.$t('test_track.case.batch_copy'),
handleClick: this.handleBatchMove, 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'), name: this.$t('test_track.case.batch_delete_case'),
handleClick: this.handleDeleteBatchToPublic, handleClick: this.handleDeleteBatchToPublic,
permissions: ['PROJECT_TRACK_CASE:READ+DELETE'], permissions: ['PROJECT_TRACK_CASE:READ+BATCH_DELETE'],
}, },
], ],
trashButtons: [ trashButtons: [
{ {
name: this.$t('commons.reduction'), name: this.$t('commons.reduction'),
handleClick: this.batchReduction, 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'), name: this.$t('test_track.case.batch_delete_case'),
handleClick: this.handleDeleteBatch, handleClick: this.handleDeleteBatch,
permissions: ['PROJECT_TRACK_CASE:READ+DELETE'] permissions: ['PROJECT_TRACK_CASE:READ+BATCH_DELETE']
} }
], ],
operators: [], operators: [],