diff --git a/frontend/src/business/components/api/automation/scenario/ScenarioExtendBtns.vue b/frontend/src/business/components/api/automation/scenario/ScenarioExtendBtns.vue
index d549231414..b6dad7b10b 100644
--- a/frontend/src/business/components/api/automation/scenario/ScenarioExtendBtns.vue
+++ b/frontend/src/business/components/api/automation/scenario/ScenarioExtendBtns.vue
@@ -10,7 +10,6 @@
{{ $t('api_test.automation.schedule') }}
{{ $t('api_test.create_performance_test') }}
@@ -51,6 +50,10 @@ export default {
}
},
createPerformance(row) {
+ if (!hasPermission('PROJECT_PERFORMANCE_TEST:READ+CREATE')) {
+ this.$warning(this.$t('api_test.create_performance_test_tips'));
+ return;
+ }
this.infoDb = false;
let url = "/api/automation/genPerformanceTestJmx";
let run = {};
diff --git a/frontend/src/business/components/api/definition/components/reference/ApiCaseTableExtendBtns.vue b/frontend/src/business/components/api/definition/components/reference/ApiCaseTableExtendBtns.vue
index a8f299469e..481e4a0248 100644
--- a/frontend/src/business/components/api/definition/components/reference/ApiCaseTableExtendBtns.vue
+++ b/frontend/src/business/components/api/definition/components/reference/ApiCaseTableExtendBtns.vue
@@ -9,7 +9,6 @@
{{ $t('commons.execute_history') }}
{{ $t('api_test.create_performance_test') }}
@@ -42,6 +41,10 @@ export default {
this.$emit("showCaseRef", this.row);
break;
case "create_performance":
+ if (!hasPermission('PROJECT_PERFORMANCE_TEST:READ+CREATE')) {
+ this.$warning(this.$t('api_test.create_performance_test_tips'));
+ break;
+ }
this.$emit("showEnvironment", this.row);
break;
case "history":
diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js
index 577999e86b..aef71f29a9 100644
--- a/frontend/src/i18n/en-US.js
+++ b/frontend/src/i18n/en-US.js
@@ -1135,6 +1135,7 @@ export default {
please_select_case: "Please select case",
fail_to_stop: "Fail to stop",
batch_add_parameter: "Format: parameter name: parameter value
like:Accept-Encoding:utf-8",
+ create_performance_test_tips: 'This operation cannot be completed without permission to create performance tests',
jar_config: {
title: "Upload jar package",
jar_file: "Jar Package",
diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js
index 74a9555370..be1899852e 100644
--- a/frontend/src/i18n/zh-CN.js
+++ b/frontend/src/i18n/zh-CN.js
@@ -1141,6 +1141,7 @@ export default {
please_select_case: "请选择用例",
fail_to_stop: "失败停止",
batch_add_parameter: "格式:参数名:参数值
如:Accept-Encoding:utf-8",
+ create_performance_test_tips: '没有创建性能测试的权限,无法完成此操作',
jar_config: {
title: "上传jar包",
jar_file: "jar包",
diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js
index 21492dc9b6..10e1c0f1d7 100644
--- a/frontend/src/i18n/zh-TW.js
+++ b/frontend/src/i18n/zh-TW.js
@@ -1141,6 +1141,7 @@ export default {
please_select_case: "請選擇用例",
fail_to_stop: "失敗停止",
batch_add_parameter: "格式:參數名:參數值
如:Accept-Encoding:utf-8",
+ create_performance_test_tips: '沒有創建性能測試的權限,無法完成此操作',
jar_config: {
title: "上傳jar包",
jar_file: "jar包",