Skip to content

Release 2.2.1 #586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 48 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
70a2284
Link accounts based on common authid(email)
aq-ikhwa-tech Dec 5, 2023
e2bc358
Merge branch 'dev' into fix-oauth-issues
aq-ikhwa-tech Dec 5, 2023
afa3104
Finalize fixes
aq-ikhwa-tech Dec 6, 2023
5cc8acd
Merge branch 'dev' into fix-oauth-issues
aq-ikhwa-tech Dec 6, 2023
0bc105c
fixing plugin creator
Dec 6, 2023
5772a7a
fixing plugin creator 2
Dec 6, 2023
6d02703
fix plugin creator
Dec 6, 2023
2d345e8
fix plugin creator 3
Dec 6, 2023
f615728
fix documentation for plugin creator
Dec 6, 2023
cf6b9fe
plugin creator fix dependencies
Dec 6, 2023
7440e1a
plugin creator fix dependencies
Dec 6, 2023
756b294
Merge pull request #567 from lowcoder-org/fix-plugin-creator
FalkWolsky Dec 6, 2023
669b379
plugin creator fix dependencies
Dec 6, 2023
885d0dc
Bump Vite to 4.5.1
Dec 6, 2023
efa905a
Updated Component Plugin Demo
Dec 6, 2023
02327cf
Updated Component Plugin Demo
Dec 6, 2023
53afb73
Merge pull request #566 from lowcoder-org/fix-oauth-issues
FalkWolsky Dec 7, 2023
2f4504f
fix: fix build issues
raheeliftikhar5 Dec 7, 2023
1873519
small fix
raheeliftikhar5 Dec 7, 2023
d516538
lock file
raheeliftikhar5 Dec 7, 2023
9979f42
Merge pull request #568 from raheeliftikhar5/build-fix
FalkWolsky Dec 7, 2023
98ab214
Fixes in workspaces anc comp includes
Dec 7, 2023
9595937
Fixes in workspaces anc comp includes
Dec 7, 2023
71148c1
fix: avoid editor popup close on selecting suggeston using mouse
raheeliftikhar5 Dec 7, 2023
f606a4c
fix: enable scroll in table columns configs popup
raheeliftikhar5 Dec 7, 2023
b1e50c4
fix: avoid editor popup close when open from config popup
raheeliftikhar5 Dec 8, 2023
89d21d0
fix: date input validation fix
raheeliftikhar5 Dec 8, 2023
a41adbe
fix: table status column's text color fix
raheeliftikhar5 Dec 8, 2023
fab5301
Reverted changes for Workspaces.
Dec 8, 2023
8d7b3d1
Merge pull request #569 from raheeliftikhar5/editor-fixes
FalkWolsky Dec 8, 2023
c0896af
Merge pull request #570 from raheeliftikhar5/issue-369/date-input-val…
FalkWolsky Dec 8, 2023
cb5bff0
Merge pull request #571 from raheeliftikhar5/table-status-column-style
FalkWolsky Dec 8, 2023
2b20d3f
Reverted changes for Workspaces.
Dec 8, 2023
6845453
Add functionality to allow users to link to auth providers while bein…
aq-ikhwa-tech Dec 9, 2023
95aae3c
Add handling for LOWCODER_CREATE_SIGNUP_WORKSPACE
aq-ikhwa-tech Dec 9, 2023
0a96750
Merge branch 'dev' into link-oauth-providers-for-existing-users
FalkWolsky Dec 9, 2023
b7c4928
new: simplify api service build
ludomikula Dec 6, 2023
b0d08a8
new: allow serving static files from mounted volume
ludomikula Dec 10, 2023
b106575
Merge pull request #572 from lowcoder-org/link-oauth-providers-for-ex…
FalkWolsky Dec 10, 2023
6292b35
Merge branch 'dev' into docker_build_update
FalkWolsky Dec 10, 2023
4304708
Merge pull request #574 from lowcoder-org/docker_build_update
FalkWolsky Dec 11, 2023
757d772
removed lowcoder-dev-utils
raheeliftikhar5 Dec 13, 2023
8130928
fix build issues
raheeliftikhar5 Dec 13, 2023
e9a75c0
Merge pull request #578 from raheeliftikhar5/remove-dev-utils
FalkWolsky Dec 13, 2023
3a74b79
remove create-lowcoder-plugin + version upgrade for publish
raheeliftikhar5 Dec 13, 2023
6170b11
Merge pull request #579 from raheeliftikhar5/publish-modules
FalkWolsky Dec 13, 2023
990ff84
Custom plugin publishing issues (#583)
raheeliftikhar5 Dec 14, 2023
ed99678
added hover and active color options in link styles (#585)
raheeliftikhar5 Dec 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Link accounts based on common authid(email)
  • Loading branch information
aq-ikhwa-tech committed Dec 5, 2023
commit 70a22845448369fe354cb87d268a2685bfd388f5
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ public interface UserRepository extends ReactiveMongoRepository<User, String> {

Mono<User> findByConnections_SourceAndConnections_RawId(String source, String rawId);

Flux<User> findByConnections_RawId(String rawId);

Flux<User> findByConnections_SourceAndConnections_RawIdIn(String source, Collection<String> rawIds);

}
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,18 @@ public interface UserService {

Mono<Boolean> bindEmail(User user, String email);

Mono<User> findByAuthUser(AuthUser authUser);
Mono<User> findByAuthUserSourceAndRawId(AuthUser authUser);

Flux<User> findByAuthUserRawId(AuthUser authUser);

Mono<User> createNewUserByAuthUser(AuthUser authUser);

Mono<Void> getUserAvatar(ServerWebExchange exchange, String userId);

Mono<Boolean> addNewConnection(String userId, Connection connection);

Mono<User> addNewConnectionAndReturnUser(String userId, Connection connection);

Mono<Void> deleteProfilePhoto(User visitor);

Mono<Boolean> updatePassword(String userId, String oldPassword, String newPassword);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ public Mono<User> findBySourceAndId(String source, String sourceUuid) {
return repository.findByConnections_SourceAndConnections_RawId(source, sourceUuid);
}

public Flux<User> findByRawId(String rawUuid) {
return repository.findByConnections_RawId(rawUuid);
}

@Override
public Mono<Boolean> saveProfilePhoto(Part filePart, User user) {
String prevAvatar = ObjectUtils.defaultIfNull(user.getAvatar(), "");
Expand Down Expand Up @@ -143,10 +147,15 @@ public Mono<User> update(String id, User updatedUser) {
}

@Override
public Mono<User> findByAuthUser(AuthUser authUser) {
public Mono<User> findByAuthUserSourceAndRawId(AuthUser authUser) {
return findBySourceAndId(authUser.getSource(), authUser.getUid());
}

@Override
public Flux<User> findByAuthUserRawId(AuthUser authUser) {
return findByRawId(authUser.getUid());
}

@Override
public Mono<User> createNewUserByAuthUser(AuthUser authUser) {
User newUser = new User();
Expand Down Expand Up @@ -198,6 +207,13 @@ public Mono<Boolean> addNewConnection(String userId, Connection connection) {
.then(Mono.just(true));
}

@Override
public Mono<User> addNewConnectionAndReturnUser(String userId, Connection connection) {
return findById(userId)
.doOnNext(user -> user.getConnections().add(connection))
.flatMap(repository::save);
}

@Override
public Mono<Void> deleteProfilePhoto(User visitor) {
String userAvatar = visitor.getAvatar();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,26 @@ public Mono<Void> loginOrRegister(AuthUser authUser, ServerWebExchange exchange,
}

private Mono<User> updateOrCreateUser(AuthUser authUser) {
return findByAuthUser(authUser)
.flatMap(findByAuthUser -> {
if (findByAuthUser.userExist()) {
User user = findByAuthUser.user();
return findByAuthUserSourceAndRawId(authUser).zipWith(findByAuthUserRawId(authUser))
.flatMap(tuple -> {

FindByAuthUser findByAuthUserFirst = tuple.getT1();
FindByAuthUser findByAuthUserSecond = tuple.getT2();

// If the user is found for the same auth source and id, just update the connection
if (findByAuthUserFirst.userExist()) {
User user = findByAuthUserFirst.user();
updateConnection(authUser, user);
return userService.update(user.getId(), user);
}

//If the user connection is not found with login id, but the user is
// found for the same id in some different connection, then just add a new connection to the user
if(findByAuthUserSecond.userExist()) {
User user = findByAuthUserSecond.user();
return userService.addNewConnectionAndReturnUser(user.getId(), authUser.toAuthConnection());
}

// if the user is logging/registering via OAuth provider for the first time,
// but is not anonymous, then just add a new connection

Expand All @@ -183,12 +195,18 @@ private Mono<User> updateOrCreateUser(AuthUser authUser) {
});
}

protected Mono<FindByAuthUser> findByAuthUser(AuthUser authUser) {
return userService.findByAuthUser(authUser)
protected Mono<FindByAuthUser> findByAuthUserSourceAndRawId(AuthUser authUser) {
return userService.findByAuthUserSourceAndRawId(authUser)
.map(user -> new FindByAuthUser(true, user))
.defaultIfEmpty(new FindByAuthUser(false, null));
}

protected Mono<FindByAuthUser> findByAuthUserRawId(AuthUser authUser) {
return userService.findByAuthUserRawId(authUser).collectList()
.map(user -> new FindByAuthUser(true, user.stream().findFirst().get()))
.defaultIfEmpty(new FindByAuthUser(false, null));
}

/**
* Update the connection after re-authenticating
*/
Expand Down