fix(接口定义): 修复场景只读用户可以执行的缺陷
--bug=1016356 --user=王孝刚 [接口测试] github#17099只读用户使用CTRL+R快捷键可以执行用例 https://www.tapd.cn/55049933/s/1234250
This commit is contained in:
parent
816d26445b
commit
b084094302
|
@ -112,7 +112,7 @@
|
||||||
<el-tooltip v-if="!debugLoading" content="Ctrl + R" placement="top">
|
<el-tooltip v-if="!debugLoading" content="Ctrl + R" placement="top">
|
||||||
<el-dropdown split-button type="primary" @click="runDebug" class="ms-message-right" size="mini"
|
<el-dropdown split-button type="primary" @click="runDebug" class="ms-message-right" size="mini"
|
||||||
@command="handleCommand"
|
@command="handleCommand"
|
||||||
v-permission="['PROJECT_API_SCENARIO:READ+EDIT', 'PROJECT_API_SCENARIO:READ+CREATE']">
|
v-permission="['PROJECT_API_SCENARIO:READ+EDIT', 'PROJECT_API_SCENARIO:READ+CREATE', 'PROJECT_API_SCENARIO:READ+COPY']">
|
||||||
{{ $t('api_test.request.debug') }}
|
{{ $t('api_test.request.debug') }}
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item>{{ $t('api_test.automation.generate_report') }}</el-dropdown-item>
|
<el-dropdown-item>{{ $t('api_test.automation.generate_report') }}</el-dropdown-item>
|
||||||
|
@ -393,7 +393,8 @@ import {
|
||||||
handleCtrlSEvent,
|
handleCtrlSEvent,
|
||||||
hasLicense,
|
hasLicense,
|
||||||
objToStrMap,
|
objToStrMap,
|
||||||
strMapToObj
|
strMapToObj,
|
||||||
|
hasPermission
|
||||||
} from "@/common/js/utils";
|
} from "@/common/js/utils";
|
||||||
import "@/common/css/material-icons.css";
|
import "@/common/css/material-icons.css";
|
||||||
import OutsideClick from "@/common/js/outside-click";
|
import OutsideClick from "@/common/js/outside-click";
|
||||||
|
@ -1440,6 +1441,9 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
runDebug(runScenario) {
|
runDebug(runScenario) {
|
||||||
|
if (!hasPermission('PROJECT_API_SCENARIO:READ+EDIT')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.mergeScenario(this.scenarioDefinition);
|
this.mergeScenario(this.scenarioDefinition);
|
||||||
if (this.debugLoading) {
|
if (this.debugLoading) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue