Skip to content

Commit

Permalink
fix: 修复用户禁用判断逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
Roozenlz committed Aug 2, 2024
1 parent b4ef145 commit e904dce
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ public Mono<Void> validatePolicyConfig(@RequestBody AListProperties properties)
new ParameterizedTypeReference<AListResult<AListGetCurrentUserInfoRes>>() {
})
.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()
Expand Down

0 comments on commit e904dce

Please sign in to comment.