From fdbadd5494d39ed26a1c983bcf8db1df3e84214f Mon Sep 17 00:00:00 2001 From: WangXu10 Date: Tue, 16 Jul 2024 14:03:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E5=AF=BC=E5=87=BA=E6=8C=89=E9=92=AE=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1044011 --user=王旭 【接口测试】导出权限控制按钮未隐藏 https://www.tapd.cn/55049933/s/1548936 --- .../io/metersphere/api/parser/api/Swagger3ExportParser.java | 2 +- .../io/metersphere/plan/dto/TestPlanCollectionAssociateDTO.java | 2 +- .../api-test/management/components/management/api/apiTable.vue | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/parser/api/Swagger3ExportParser.java b/backend/services/api-test/src/main/java/io/metersphere/api/parser/api/Swagger3ExportParser.java index 772a017e80..9737359d1d 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/parser/api/Swagger3ExportParser.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/parser/api/Swagger3ExportParser.java @@ -160,7 +160,7 @@ public class Swagger3ExportParser implements ExportParser { statusCodeInfo.put("description", responseJSONObject.optString("value")); } if (StringUtils.isNotBlank(responseJSONObject.optString("name"))) { - responseBody.put(responseJSONObject.optString("name"), statusCodeInfo); + responseBody.put(statusCode, statusCodeInfo); } } } diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/TestPlanCollectionAssociateDTO.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/TestPlanCollectionAssociateDTO.java index c938739e0b..4ab80d33b7 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/TestPlanCollectionAssociateDTO.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/dto/TestPlanCollectionAssociateDTO.java @@ -19,7 +19,7 @@ public class TestPlanCollectionAssociateDTO implements Serializable { private static final long serialVersionUID = 1L; @Schema(description = "是否选择所有模块") - private boolean selectAllModule; + private boolean selectAllModule = false; @Schema(description = "模块下的id集合属性", requiredMode = Schema.RequiredMode.REQUIRED) private Map moduleMaps; diff --git a/frontend/src/views/api-test/management/components/management/api/apiTable.vue b/frontend/src/views/api-test/management/components/management/api/apiTable.vue index 7bd0749530..e3c91dcaaf 100644 --- a/frontend/src/views/api-test/management/components/management/api/apiTable.vue +++ b/frontend/src/views/api-test/management/components/management/api/apiTable.vue @@ -567,6 +567,7 @@ eventTag: 'exportSwagger', }, ], + permission: ['PROJECT_API_DEFINITION:READ+EXPORT'], }, { label: 'common.edit',