From f84fc654679741f2d4d74c1343bcbe852e39d3a1 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Wed, 14 Jun 2023 19:06:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=9D=83=E9=99=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1027038 --user=王孝刚 【接口测试】只读用户-快捷调试-可点击另存为新用例-进入创建用例页面-但是无法填名称 https://www.tapd.cn/55049933/s/1382020 --bug=1027033 --user=王孝刚 【接口测试】只读用户-接口定义-环境配置-可编辑环境 https://www.tapd.cn/55049933/s/1382022 --bug=1027012 --user=王孝刚 【接口测试】只读用户开启场景调试权限-场景详情-点击调试没反应 https://www.tapd.cn/55049933/s/1382025 --bug=1026828 --user=王孝刚 【系统设置】用户组和权限-项目管理员未开启性能测试报告的“删除权限”,导致用户不能修改性能测试的报告名称。 https://www.tapd.cn/55049933/s/1382027 --- .../automation/scenario/EditApiScenario.vue | 4 +-- .../scenario/common/ApiBaseComponent.vue | 31 +++++++++++++----- .../scenario/component/ApiComponent.vue | 12 +++++-- .../component/ApiScenarioComponent.vue | 32 ++++++++++++------- .../components/debug/DebugHttpPage.vue | 2 +- .../components/runtest/RunTestHTTPPage.vue | 2 +- .../environment/EnvironmentCommonConfig.vue | 2 +- .../environment/EnvironmentEdit.vue | 2 +- .../environment/EnvironmentHttpConfig.vue | 14 ++++---- .../environment/database/DatabaseConfig.vue | 2 +- .../database/DatabaseConfigList.vue | 4 +-- 11 files changed, 69 insertions(+), 38 deletions(-) diff --git a/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue b/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue index 6f9d69b1b8..21d5bc423e 100644 --- a/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue +++ b/api-test/frontend/src/business/automation/scenario/EditApiScenario.vue @@ -568,7 +568,7 @@ import { KeyValue } from '@/business/definition/model/ApiTestModel'; import { getCurrentProjectID, getCurrentUser } from 'metersphere-frontend/src/utils/token'; import { getUUID, objToStrMap, strMapToObj } from 'metersphere-frontend/src/utils'; -import { hasLicense, hasPermission } from 'metersphere-frontend/src/utils/permission'; +import { hasLicense, hasPermissions } from 'metersphere-frontend/src/utils/permission'; import OutsideClick from './common/outside-click'; import { getReportMessageSocket, @@ -1723,7 +1723,7 @@ export default { }); }, runDebug(runScenario) { - if (!hasPermission('PROJECT_API_SCENARIO:READ+EDIT')) { + if (!hasPermissions('PROJECT_API_SCENARIO:READ+DEBUG','PROJECT_API_SCENARIO:READ+RUN')) { return; } this.mergeScenario(this.scenarioDefinition); diff --git a/api-test/frontend/src/business/automation/scenario/common/ApiBaseComponent.vue b/api-test/frontend/src/business/automation/scenario/common/ApiBaseComponent.vue index be28ba5bb1..b815c9bec6 100644 --- a/api-test/frontend/src/business/automation/scenario/common/ApiBaseComponent.vue +++ b/api-test/frontend/src/business/automation/scenario/common/ApiBaseComponent.vue @@ -65,18 +65,18 @@
+ @click.stop> - + + :disabled="(data.disabled && !data.root && !data.isCopy) || !showVersion || isDeleted" + v-permission="[ + 'PROJECT_API_SCENARIO:READ+EDIT', + 'PROJECT_API_SCENARIO:READ+CREATE', + 'PROJECT_API_SCENARIO:READ+COPY', + ]"/>
diff --git a/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue b/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue index 35160905bc..22a5529e72 100644 --- a/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue +++ b/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue @@ -90,7 +90,11 @@ icon="el-icon-video-play" class="ms-btn" size="mini" - circle /> + circle + v-permission="[ + 'PROJECT_API_SCENARIO:READ+DEBUG', + 'PROJECT_API_SCENARIO:READ+RUN' + ]"/> + circle + v-permission="[ + 'PROJECT_API_SCENARIO:READ+DEBUG', + 'PROJECT_API_SCENARIO:READ+RUN' + ]">
STOP
diff --git a/api-test/frontend/src/business/automation/scenario/component/ApiScenarioComponent.vue b/api-test/frontend/src/business/automation/scenario/component/ApiScenarioComponent.vue index 7a20276d4c..5db364911f 100644 --- a/api-test/frontend/src/business/automation/scenario/component/ApiScenarioComponent.vue +++ b/api-test/frontend/src/business/automation/scenario/component/ApiScenarioComponent.vue @@ -29,7 +29,7 @@ - + {{ $t('project.version.name') }}: {{ scenario.versionName }} @@ -39,9 +39,9 @@ {{ $t('api_test.automation.reference_deleted') }} - {{ $t('commons.copy') }} + {{ $t('commons.copy') }} {{ $t('api_test.scenario.reference') }} + >{{ $t('api_test.scenario.reference') }} {{ getProjectName(scenario.projectId) }} - +