Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit95aae3c

Browse files
committed
Add handling for LOWCODER_CREATE_SIGNUP_WORKSPACE
1 parent6845453 commit95aae3c

File tree

5 files changed

+14
-4
lines changed

5 files changed

+14
-4
lines changed

‎server/api-service/lowcoder-sdk/src/main/java/org/lowcoder/sdk/config/AuthProperties.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public class AuthProperties {
2828
privateOauth2Simplegoogle =newOauth2Simple();
2929
privateOauth2Simplegithub =newOauth2Simple();
3030
privateApiKeyapiKey =newApiKey();
31+
privateBooleanworkspaceCreation;
3132

3233
@Getter
3334
@Setter

‎server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/service/AuthenticationApiServiceImpl.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
importorg.lowcoder.domain.user.model.*;
3030
importorg.lowcoder.domain.user.service.UserService;
3131
importorg.lowcoder.sdk.auth.AbstractAuthConfig;
32+
importorg.lowcoder.sdk.config.AuthProperties;
3233
importorg.lowcoder.sdk.exception.BizError;
3334
importorg.lowcoder.sdk.exception.BizException;
3435
importorg.lowcoder.sdk.util.CookieHelper;
@@ -85,6 +86,9 @@ public class AuthenticationApiServiceImpl implements AuthenticationApiService {
8586
@Autowired
8687
privateJWTUtilsjwtUtils;
8788

89+
@Autowired
90+
privateAuthPropertiesauthProperties;
91+
8892
@Override
8993
publicMono<AuthUser>authenticateByForm(StringloginId,Stringpassword,Stringsource,booleanregister,StringauthId,StringorgId) {
9094
returnauthenticate(authId,source,newFormAuthRequestContext(loginId,password,register,orgId));
@@ -142,7 +146,9 @@ public Mono<Void> loginOrRegister(AuthUser authUser, ServerWebExchange exchange,
142146
})
143147
// after register
144148
.delayUntil(user -> {
145-
if (user.getIsNewUser()) {
149+
booleancreateWorkspace =
150+
authUser.getOrgId() ==null &&StringUtils.isBlank(invitationId) &&authProperties.getWorkspaceCreation();
151+
if (user.getIsNewUser() &&createWorkspace) {
146152
returnonUserRegister(user);
147153
}
148154
returnMono.empty();

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

Lines changed: 4 additions & 3 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@localhost:27017/lowcoder?authSource=admin
6+
uri:mongodb://192.168.8.103:27017/lowcoder?authSource=admin
77
redis:
8-
url:redis://localhost:6379
8+
url:redis://192.168.8.103:6379
99
main:
1010
allow-bean-definition-overriding:true
1111
allow-circular-references:true
@@ -61,4 +61,5 @@ auth:
6161
secret:5a41b090758b39b226603177ef48d73ae9839dd458ccb7e66f7e7cc028d5a50b
6262
email:
6363
enable:true
64-
enable-register:true
64+
enable-register:true
65+
workspace-creation:false

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ auth:
1313
email:
1414
enable:${LOGIN_CHANNEL_EMAIL:true}
1515
enable-register:${ENABLE_USER_SIGN_UP:true}
16+
workspace-creation:${LOWCODER_CREATE_SIGNUP_WORKSPACE:true}
1617

1718
spring:
1819
data:

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ auth:
44
email:
55
enable:true
66
enable-register:${ENABLE_USER_SIGN_UP:true}
7+
workspace-creation:${LOWCODER_CREATE_SIGNUP_WORKSPACE:true}
78

89
spring:
910
data:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp