fix: 接口案例列表增加权限控制

接口案例列表增加权限控制
This commit is contained in:
song-tianyang 2021-05-27 10:49:41 +08:00 committed by BugKing
parent bf529cc8b5
commit be1ef89069
2 changed files with 6 additions and 1 deletions

View File

@ -105,10 +105,13 @@
<ms-table-operator-button class="run-button" <ms-table-operator-button class="run-button"
:tip="$t('api_test.automation.execute')" :tip="$t('api_test.automation.execute')"
icon="el-icon-video-play" icon="el-icon-video-play"
v-permission="['PROJECT_API_DEFINITION:READ+RUN']"
@exec="runTestCase(scope.row)"/> @exec="runTestCase(scope.row)"/>
<ms-table-operator-button :tip="$t('commons.edit')" icon="el-icon-edit" @exec="handleTestCase(scope.row)" <ms-table-operator-button :tip="$t('commons.edit')" icon="el-icon-edit" @exec="handleTestCase(scope.row)"
v-permission="['PROJECT_API_DEFINITION:READ+EDIT_CASE']"
/> />
<ms-table-operator-button :tip="$t('commons.delete')" icon="el-icon-delete" @exec="handleDelete(scope.row)" <ms-table-operator-button :tip="$t('commons.delete')" icon="el-icon-delete" @exec="handleDelete(scope.row)"
v-permission="['PROJECT_API_DEFINITION:READ+DELETE_CASE']"
type="danger"/> type="danger"/>
<ms-api-case-table-extend-btns @showCaseRef="showCaseRef" @showEnvironment="showEnvironment" <ms-api-case-table-extend-btns @showCaseRef="showCaseRef" @showEnvironment="showEnvironment"
@createPerformance="createPerformance" :row="scope.row"/> @createPerformance="createPerformance" :row="scope.row"/>

View File

@ -5,7 +5,9 @@
</el-link> </el-link>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="ref">{{ $t('api_test.automation.view_ref') }}</el-dropdown-item> <el-dropdown-item command="ref">{{ $t('api_test.automation.view_ref') }}</el-dropdown-item>
<el-dropdown-item command="create_performance" v-modules="['performance']"> <el-dropdown-item command="create_performance" v-modules="['performance']"
v-permission="['PROJECT_API_DEFINITION:READ+CREATE_PERFORMANCE']"
>
{{ $t('api_test.create_performance_test') }} {{ $t('api_test.create_performance_test') }}
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>