Skip to content

Commit 17d0d43

Browse files
committed
Fix 2 bugs
- Mongo DB Queries were not working because of integer timeout data type - Took into account the enable-register application.props value when loading auth configs
1 parent a20d269 commit 17d0d43

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
import lombok.extern.slf4j.Slf4j;
44
import org.lowcoder.domain.organization.service.OrganizationService;
55
import org.lowcoder.sdk.auth.AbstractAuthConfig;
6+
import org.lowcoder.sdk.auth.EmailAuthConfig;
67
import org.lowcoder.sdk.config.AuthProperties;
78
import org.lowcoder.sdk.config.CommonConfig;
9+
import org.lowcoder.sdk.constants.AuthSourceConstants;
810
import org.lowcoder.sdk.constants.WorkspaceMode;
911
import org.springframework.beans.factory.annotation.Autowired;
1012
import org.springframework.stereotype.Service;
@@ -58,7 +60,9 @@ public Flux<FindAuthConfig> findAllAuthConfigs(String orgId, boolean enableOnly)
5860
}
5961
return true;
6062
})
61-
.concatWithValues(new FindAuthConfig(DEFAULT_AUTH_CONFIG, null));
63+
.concatWithValues(new FindAuthConfig
64+
(new EmailAuthConfig(AuthSourceConstants.EMAIL, authProperties.getEmail().isEnable(),
65+
authProperties.getEmail().isEnableRegister()), null));
6266
}
6367

6468
private Flux<FindAuthConfig> findAllAuthConfigsByDomain() {

server/api-service/lowcoder-domain/src/main/java/org/lowcoder/domain/query/service/QueryExecutionService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public Mono<QueryExecutionResult> executeQuery(Datasource datasource, Map<String
4848
String timeoutStr, QueryVisitorContext queryVisitorContext) {
4949

5050
int timeoutMs = QueryTimeoutUtils.parseQueryTimeoutMs(timeoutStr, requestParams, common.getMaxQueryTimeout());
51-
queryConfig.putIfAbsent("timeoutMs", timeoutMs);
51+
queryConfig.putIfAbsent("timeoutMs", String.valueOf(timeoutMs));
5252

5353
return Mono.defer(() -> {
5454
if (datasourceMetaInfoService.isJsDatasourcePlugin(datasource.getType())) {

server/api-service/lowcoder-server/src/main/resources/application-lowcoder.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ spring:
33
mongodb:
44
authentication-database: admin
55
auto-index-creation: false
6-
uri: mongodb://lowcoder:secret123@127.0.0.1/lowcoder?authSource=admin
6+
uri: mongodb://192.168.8.100:27017/lowcoder?authSource=admin
77
redis:
8-
url: redis://localhost:6379
8+
url: redis://192.168.8.100:6379
99
main:
1010
allow-bean-definition-overriding: true
1111
allow-circular-references: true
@@ -41,6 +41,8 @@ common:
4141
- '*'
4242
version: 1.1.8
4343
block-hound-enable: false
44+
js-executor:
45+
host: http://127.0.0.1:6060
4446

4547
material:
4648
mongodb-grid-fs:
@@ -52,3 +54,8 @@ springdoc:
5254
swagger-ui:
5355
path: /api/docs/swagger-ui
5456
paths-to-exclude: /api/v1/**
57+
58+
auth:
59+
email:
60+
enable: true
61+
enable-register: false

0 commit comments

Comments
 (0)