fix(接口测试): 修复没有性能测试权限可以跳转到性能测试页面的问题
--story=1006933 --user=刘瑞斌 #12149用户无性能测试权限依然可以跳转到性能测试页面(1.20分支同步上) https://www.tapd.cn/55049933/s/1157920 Closes #12149
This commit is contained in:
parent
dad975a78a
commit
777e7ff58a
|
@ -308,7 +308,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {downloadFile, getCurrentProjectID, getUUID, hasLicense, objToStrMap, strMapToObj} from "@/common/js/utils";
|
||||
import {downloadFile, getCurrentProjectID, getUUID, hasLicense, hasPermission, objToStrMap, strMapToObj} from "@/common/js/utils";
|
||||
import {API_SCENARIO_CONFIGS} from "@/business/components/common/components/search/search-components";
|
||||
import {API_SCENARIO_LIST} from "../../../../../common/js/constants";
|
||||
|
||||
|
@ -536,7 +536,10 @@ export default {
|
|||
{
|
||||
name: this.$t('api_test.create_performance_test_batch'),
|
||||
handleClick: this.batchCreatePerformance,
|
||||
permissions: ['PROJECT_API_SCENARIO:READ+CREATE_PERFORMANCE_BATCH']
|
||||
permissions: ['PROJECT_API_SCENARIO:READ+CREATE_PERFORMANCE_BATCH'],
|
||||
isDisable() {
|
||||
return !hasPermission('PROJECT_PERFORMANCE_TEST:READ+CREATE')
|
||||
}
|
||||
},
|
||||
],
|
||||
typeArr: [
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
{{ $t('api_test.automation.schedule') }}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item command="create_performance" v-permission="['PROJECT_API_SCENARIO:READ+CREATE_PERFORMANCE']"
|
||||
v-if="hasPermission('PROJECT_PERFORMANCE_TEST:READ+CREATE')"
|
||||
v-modules="['performance']">
|
||||
{{ $t('api_test.create_performance_test') }}
|
||||
</el-dropdown-item>
|
||||
|
@ -24,7 +25,7 @@
|
|||
<script>
|
||||
import MsReferenceView from "@/business/components/api/automation/scenario/ReferenceView";
|
||||
import MsScheduleMaintain from "@/business/components/api/automation/schedule/ScheduleMaintain";
|
||||
import {getCurrentProjectID, getUUID} from "@/common/js/utils";
|
||||
import {getCurrentProjectID, getUUID, hasPermission} from "@/common/js/utils";
|
||||
|
||||
export default {
|
||||
name: "MsScenarioExtendButtons",
|
||||
|
@ -34,6 +35,7 @@ export default {
|
|||
request: {}
|
||||
},
|
||||
methods: {
|
||||
hasPermission,
|
||||
handleCommand(cmd) {
|
||||
switch (cmd) {
|
||||
case "ref":
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
{{ $t('commons.execute_history') }}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item command="create_performance" v-modules="['performance']"
|
||||
v-if="hasPermission('PROJECT_PERFORMANCE_TEST:READ+CREATE')"
|
||||
v-permission="['PROJECT_API_DEFINITION:READ+CREATE_PERFORMANCE']">
|
||||
{{ $t('api_test.create_performance_test') }}
|
||||
</el-dropdown-item>
|
||||
|
@ -18,6 +19,8 @@
|
|||
|
||||
<script>
|
||||
|
||||
import {hasPermission} from "@/common/js/utils";
|
||||
|
||||
export default {
|
||||
name: "MsApiCaseTableExtendBtns",
|
||||
components: {},
|
||||
|
@ -31,6 +34,7 @@ export default {
|
|||
},
|
||||
|
||||
methods: {
|
||||
hasPermission,
|
||||
handleCommand(cmd) {
|
||||
if (this.row.id) {
|
||||
switch (cmd) {
|
||||
|
|
Loading…
Reference in New Issue