GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||
GeezerVison is showing github.com — Fix email 2FA completion for encoded Admin usernames by Storypapst · Pull Request #728 · OpenResilienceInitiative/ORISO-UserService Conversation
|
📝 WalkthroughSummary by CodeRabbit
Walkthrough
ChangesEmail verification username handling
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@coderabbitai review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
✅ Action performedReview finished.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
src/test/java/de/caritas/cob/userservice/api/IdentityManagerTest.java (1)
43-51: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAssert the raw username is retained for OTP verification.
The current stub causes an incorrect OTP username to fail indirectly via a null result. Explicitly verify the interaction so the test documents both sides of the contract.
Suggested test strengthening
- identityManager.validateOneTimePassword(RAW_USERNAME, "123456"); + assertThat(identityManager.validateOneTimePassword(RAW_USERNAME, "123456")) + .isEqualTo(validationResult); + verify(identityClient).finishEmailVerification(RAW_USERNAME, "123456"); verify(identityClient).changeEmailAddress(RAW_USERNAME, EMAIL);🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/test/java/de/caritas/cob/userservice/api/IdentityManagerTest.java` around lines 43 - 51, The test should explicitly verify that OTP validation calls finishEmailVerification with the original RAW_USERNAME and OTP, in addition to verifying changeEmailAddress uses RAW_USERNAME. Update validateOneTimePasswordShouldKeepAlreadyRawUsernameForKeycloakEmailUpdate to add the missing interaction assertion while preserving the existing stubbing and email-update verification.
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/test/java/de/caritas/cob/userservice/api/IdentityManagerTest.java`:
- Around line 43-51: The test should explicitly verify that OTP validation calls
finishEmailVerification with the original RAW_USERNAME and OTP, in addition to
verifying changeEmailAddress uses RAW_USERNAME. Update
validateOneTimePasswordShouldKeepAlreadyRawUsernameForKeycloakEmailUpdate to add
the missing interaction assertion while preserving the existing stubbing and
email-update verification.
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 0bd85131-b46d-40fe-8f73-8472c4dfc1d3
src/main/java/de/caritas/cob/userservice/api/IdentityManager.javasrc/test/java/de/caritas/cob/userservice/api/IdentityManagerTest.javaLearnt from: Storypapst
Repo: OpenResilienceInitiative/ORISO-UserService PR: 420
File: src/main/java/de/caritas/cob/userservice/api/conversation/service/AnonymousConversationCreatorService.java:34-35
Timestamp: 2026-07-12T05:15:05.095Z
Learning: In ORISO-UserService, treat `rocket-chat.enabled` defaulting to `false` (e.g., `Value("${rocket-chat.enabled:false}")`) as an intentional Matrix-only default. Do not flag code paths/config placeholders that use this default-false behavior as a bug in future reviews. Rocket.Chat must be explicitly enabled only by setting `ROCKET_CHAT_ENABLED=true` (or the equivalent `rocket-chat.enabled=true`), consistent with the repository’s `application*.properties`/configuration validator and the disabled Rocket.Chat service wiring.
Applied to files:
src/main/java/de/caritas/cob/userservice/api/IdentityManager.javasrc/main/java/de/caritas/cob/userservice/api/IdentityManager.java (1)
36-36: LGTM!src/test/java/de/caritas/cob/userservice/api/IdentityManagerTest.java (1)
4-4: LGTM!Also applies to: 29-41
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.