-
Notifications
You must be signed in to change notification settings - Fork 64
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
SSO login bug fix #2492
Merged
Merged
SSO login bug fix #2492
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
26e925d
SSO login bug fix
muralibasani 58f6d71
🤖 Auto-update API types for TypeScript usage
github-actions[bot] 31f86d0
Merge branch 'main' into sso-login-fix
muralibasani d14b270
Increment users list after adding users
muralibasani e8c1a1b
Merge branch 'main' into sso-login-fix
aindriu-aiven 24c5c6f
From review
muralibasani e46b539
Merge branch 'sso-login-fix' of github.com:Aiven-Open/klaw into sso-l…
muralibasani 308b94d
Merge branch 'main' into sso-login-fix
muralibasani File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -488,7 +488,10 @@ public void updateNewUserRequest(String username, String approver, boolean isApp | |
if (isApprove) { | ||
status = NewUserStatus.APPROVED.value; | ||
} else { | ||
status = NewUserStatus.DECLINED.value; | ||
// In case if user registration is declined, delete the record from db, so user can try to | ||
// register again with any new data. | ||
registerInfoRepo.deleteById("" + registerUser.getId()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NIT: a stylistic choice but could we use String.valueOf(registerUser.getId()) |
||
return; | ||
} | ||
if (registerUser != null) { | ||
if (NewUserStatus.PENDING.value.equals(registerUser.getStatus())) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
import io.aiven.klaw.model.requests.EnvModel; | ||
import io.aiven.klaw.model.requests.KwClustersModel; | ||
import io.aiven.klaw.model.requests.KwRolesPermissionsModel; | ||
import io.aiven.klaw.model.requests.RegisterUserInfoModel; | ||
import io.aiven.klaw.model.requests.TeamModel; | ||
import io.aiven.klaw.model.requests.UserInfoModel; | ||
import io.aiven.klaw.model.response.EnvParams; | ||
|
@@ -53,6 +54,18 @@ public UserInfoModel getUserInfoModel(String username, String role, String team) | |
return userInfoModel; | ||
} | ||
|
||
public RegisterUserInfoModel getRegisterUserInfoModel(String username, String role) { | ||
RegisterUserInfoModel userInfoModel = new RegisterUserInfoModel(); | ||
userInfoModel.setUsername(username); | ||
userInfoModel.setPwd("testpwd"); | ||
userInfoModel.setRole(role); | ||
userInfoModel.setTeamId(1001); | ||
userInfoModel.setFullname("New User"); | ||
userInfoModel.setMailid("[email protected]"); | ||
|
||
return userInfoModel; | ||
} | ||
|
||
public UserInfoModel getUserInfoModelSwitchTeams( | ||
String username, String role, int teamId, int switchTeamSize) { | ||
UserInfoModel userInfoModel = new UserInfoModel(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the User Registration is not present should we return "Failure. Registration doesn't exist"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should create a new one if not present which is done at line 401.