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) }} - +