From f812c41a7a9ba0cfb0b99ef6e944de9a17c99670 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Mon, 22 Nov 2021 12:27:34 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E7=8E=AF=E5=A2=83=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=A8=E5=B1=80=E8=AE=A4=E8=AF=81=E5=85=B3?= =?UTF-8?q?=E4=B8=8D=E6=8E=89=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1008061 --user=宋天阳 【系统设置】项目环境,全局认证关不掉【+github#7811】 https://www.tapd.cn/55049933/s/1071776 --- .../dto/definition/request/sampler/MsHTTPSamplerProxy.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java b/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java index 96351a3bf3..ba4ba8c637 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsHTTPSamplerProxy.java @@ -374,7 +374,9 @@ public class MsHTTPSamplerProxy extends MsTestElement { try { JSONObject authObject = environmentConfig.getAuthManager().getJSONObject("authManager"); if (authObject != null) { - this.authManager = authObject.toJavaObject(MsAuthManager.class); + if (authObject.containsKey("verification") && !StringUtils.equalsIgnoreCase(authObject.getString("verification"), "No Auth")) { + this.authManager = authObject.toJavaObject(MsAuthManager.class); + } } } catch (Exception e) { }