From e904dcef28fb35fc5e240cf5e6166eba03b2f333 Mon Sep 17 00:00:00 2001 From: roozen <2273038475@qq.com> Date: Fri, 2 Aug 2024 18:22:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=A6=81=E7=94=A8=E5=88=A4=E6=96=AD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/PolicyConfigValidationController.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/run/halo/alist/controller/PolicyConfigValidationController.java b/src/main/java/run/halo/alist/controller/PolicyConfigValidationController.java index e88cad3..a66e486 100644 --- a/src/main/java/run/halo/alist/controller/PolicyConfigValidationController.java +++ b/src/main/java/run/halo/alist/controller/PolicyConfigValidationController.java @@ -46,15 +46,15 @@ public Mono validatePolicyConfig(@RequestBody AListProperties properties) new ParameterizedTypeReference>() { }) .flatMap(response -> { + if (response.getCode().equals("401")){ + return Mono.error(new AListIllegalArgumentException( + "Current user is disabled")); + } if (!response.getCode().equals("200")) { return Mono.error(new AListIllegalArgumentException( "Wrong Username Or Password")); } AListGetCurrentUserInfoRes userInfo = response.getData(); - if (userInfo.isDisabled()) { - return Mono.error(new AListIllegalArgumentException( - "User is disabled")); - } return handler.getWebClients() .get(properties.getSite()) .post()