fix: 权限问题
This commit is contained in:
parent
be1ef89069
commit
7b4dfb0725
|
@ -249,7 +249,7 @@ export default {
|
|||
{
|
||||
name: this.$t('api_test.definition.request.batch_move'),
|
||||
handleClick: this.handleBatchMove,
|
||||
permissions: ['PROJECT_API_DEFINITION:READ+BATCH_MOVE']
|
||||
permissions: ['PROJECT_API_DEFINITION:READ+EDIT_API']
|
||||
}
|
||||
],
|
||||
trashButtons: [
|
||||
|
|
|
@ -40,10 +40,10 @@
|
|||
}
|
||||
},
|
||||
isDisable(item) {
|
||||
if (item.permission && item.permission.length > 0) {
|
||||
return !hasPermissions(item.permission);
|
||||
if (item.permissions && item.permissions.length > 0) {
|
||||
return !hasPermissions(...item.permissions);
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-button class="add-btn" :disabled="readOnly" type="primary" size="mini" @click="appIssue">{{ $t('test_track.issue.add_issue') }}</el-button>
|
||||
<el-button class="add-btn" :disabled="readOnly" type="primary" size="mini" @click="relateIssue">{{ $t('test_track.case.relate_issue') }}</el-button>
|
||||
<el-tooltip class="item" effect="dark"
|
||||
<el-button class="add-btn" v-permission="['PROJECT_TRACK_PLAN:READ+RELEVANCE_OR_CANCEL']" :disabled="readOnly" type="primary" size="mini" @click="appIssue">{{ $t('test_track.issue.add_issue') }}</el-button>
|
||||
<el-button class="add-btn" v-permission="['PROJECT_TRACK_PLAN:READ+RELEVANCE_OR_CANCEL']" :disabled="readOnly" type="primary" size="mini" @click="relateIssue">{{ $t('test_track.case.relate_issue') }}</el-button>
|
||||
<el-tooltip class="item" v-permission="['PROJECT_TRACK_PLAN:READ+RELEVANCE_OR_CANCEL']" effect="dark"
|
||||
:content="$t('test_track.issue.platform_tip')"
|
||||
placement="right">
|
||||
<i class="el-icon-info"/>
|
||||
|
|
|
@ -276,7 +276,8 @@ export default {
|
|||
permissions: ['PROJECT_TRACK_CASE:READ+EDIT']
|
||||
}, {
|
||||
name: this.$t('test_track.case.batch_move_case'),
|
||||
handleClick: this.handleBatchMove
|
||||
handleClick: this.handleBatchMove,
|
||||
permissions: ['PROJECT_TRACK_CASE:READ+EDIT']
|
||||
}, {
|
||||
name: this.$t('test_track.case.batch_delete_case'),
|
||||
handleClick: this.handleDeleteBatch,
|
||||
|
|
|
@ -230,9 +230,9 @@ export default {
|
|||
deletePath: "/test/case/delete",
|
||||
selectRows: new Set(),
|
||||
buttons: [
|
||||
{name: this.$t('test_track.case.batch_unlink'), handleClick: this.handleDeleteBatch, permission: ['PROJECT_TRACK_PLAN:READ+CASE_BATCH_DELETE']},
|
||||
{name: this.$t('api_test.automation.batch_execute'), handleClick: this.handleBatchExecute, permission: ['PROJECT_TRACK_PLAN:READ+CASE_BATCH_RUN']},
|
||||
{name: this.$t('test_track.case.batch_edit_case'), handleClick: this.handleBatchEdit, permission: ['PROJECT_TRACK_PLAN:READ+CASE_BATCH_EDIT']}
|
||||
{name: this.$t('test_track.case.batch_unlink'), handleClick: this.handleDeleteBatch, permissions: ['PROJECT_TRACK_PLAN:READ+CASE_BATCH_DELETE']},
|
||||
{name: this.$t('api_test.automation.batch_execute'), handleClick: this.handleBatchExecute, permissions: ['PROJECT_TRACK_PLAN:READ+CASE_BATCH_RUN']},
|
||||
{name: this.$t('test_track.case.batch_edit_case'), handleClick: this.handleBatchEdit, permissions: ['PROJECT_TRACK_PLAN:READ+CASE_BATCH_EDIT']}
|
||||
],
|
||||
typeArr: [
|
||||
{id: 'projectEnv', name: this.$t('api_test.definition.request.run_env')},
|
||||
|
|
|
@ -205,13 +205,13 @@ export default {
|
|||
...API_SCENARIO_FILTERS,
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('test_track.case.batch_unlink'), handleClick: this.handleDeleteBatch, permission: ['PROJECT_TRACK_PLAN:READ+CASE_BATCH_DELETE']
|
||||
name: this.$t('test_track.case.batch_unlink'), handleClick: this.handleDeleteBatch, permissions: ['PROJECT_TRACK_PLAN:READ+CASE_BATCH_DELETE']
|
||||
},
|
||||
{
|
||||
name: this.$t('api_test.automation.batch_execute'), handleClick: this.handleBatchExecute, permission: ['PROJECT_TRACK_PLAN:READ+CASE_BATCH_RUN']
|
||||
name: this.$t('api_test.automation.batch_execute'), handleClick: this.handleBatchExecute, permissions: ['PROJECT_TRACK_PLAN:READ+CASE_BATCH_RUN']
|
||||
},
|
||||
{
|
||||
name: this.$t('test_track.case.batch_edit_case'), handleClick: this.handleBatchEdit, permission: ['PROJECT_TRACK_PLAN:READ+CASE_BATCH_EDIT']
|
||||
name: this.$t('test_track.case.batch_edit_case'), handleClick: this.handleBatchEdit, permissions: ['PROJECT_TRACK_PLAN:READ+CASE_BATCH_EDIT']
|
||||
}
|
||||
],
|
||||
selectRows: new Set(),
|
||||
|
|
|
@ -360,10 +360,12 @@ export default {
|
|||
showMore: false,
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('test_track.case.batch_edit_case'), handleClick: this.handleBatchEdit, permission: ['PROJECT_TRACK_PLAN:READ+CASE_BATCH_EDIT']
|
||||
name: this.$t('test_track.case.batch_edit_case'), handleClick: this.handleBatchEdit,
|
||||
permissions: ['PROJECT_TRACK_PLAN:READ+CASE_BATCH_EDIT']
|
||||
},
|
||||
{
|
||||
name: this.$t('test_track.case.batch_unlink'), handleClick: this.handleDeleteBatch, permission: ['PROJECT_TRACK_PLAN:READ+CASE_BATCH_DELETE']
|
||||
name: this.$t('test_track.case.batch_unlink'), handleClick: this.handleDeleteBatch,
|
||||
permissions: ['PROJECT_TRACK_PLAN:READ+CASE_BATCH_DELETE']
|
||||
}
|
||||
],
|
||||
typeArr: [
|
||||
|
|
|
@ -199,10 +199,10 @@ export default {
|
|||
screenHeight: 'calc(100vh - 330px)',//屏幕高度
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('test_track.plan.load_case.unlink_in_bulk'), handleClick: this.handleDeleteBatch, permission: ['PROJECT_TRACK_PLAN:READ+CASE_BATCH_DELETE']
|
||||
name: this.$t('test_track.plan.load_case.unlink_in_bulk'), handleClick: this.handleDeleteBatch, permissions: ['PROJECT_TRACK_PLAN:READ+CASE_BATCH_DELETE']
|
||||
},
|
||||
{
|
||||
name: this.$t('test_track.plan.load_case.batch_exec_cases'), handleClick: this.handleRunBatch, permission: ['PROJECT_TRACK_PLAN:READ+CASE_BATCH_RUN']
|
||||
name: this.$t('test_track.plan.load_case.batch_exec_cases'), handleClick: this.handleRunBatch, permissions: ['PROJECT_TRACK_PLAN:READ+CASE_BATCH_RUN']
|
||||
}
|
||||
],
|
||||
statusFilters: [
|
||||
|
|
Loading…
Reference in New Issue