Skip to content

Commit b42a731

Browse files
committed
Fix condition for enable register email
1 parent b62739d commit b42a731

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/authentication/AuthenticationServiceImpl.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,12 @@ public Flux<FindAuthConfig> findAllAuthConfigs(String orgId, boolean enableOnly)
5959

6060
Mono<FindAuthConfig> emailAuthConfigMono = orgMemberService.doesAtleastOneAdminExist()
6161
.map(doesAtleastOneAdminExist -> {
62-
boolean shouldEnableRegister = !doesAtleastOneAdminExist && authProperties.getEmail().isEnableRegister();
62+
boolean shouldEnableRegister;
63+
if(doesAtleastOneAdminExist) {
64+
shouldEnableRegister = authProperties.getEmail().getEnableRegister();
65+
} else {
66+
shouldEnableRegister = Boolean.TRUE;
67+
}
6368
return new FindAuthConfig
6469
(new EmailAuthConfig(AuthSourceConstants.EMAIL, authProperties.getEmail().isEnable(), shouldEnableRegister), null);
6570
});

0 commit comments

Comments
 (0)