Repository navigation
fix(BA-8671): clear need_password_change when a user changes their own password - #15979
Merged
Merged
Conversation
fregataa
added a commit
that referenced
this pull request
Oct 22, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fregataa
marked this pull request as draft
October 22, 2026 01:34
seedspirit
reviewed
Oct 22, 2026
| raise UserModificationBadRequest( | ||
| "need_password_change cannot be true when changing your own password" | ||
| ) | ||
| input = input.model_copy(update={"need_password_change": False}) |
Contributor
There was a problem hiding this comment.
Does it need to be converted to false even if it's unset?
Member
Author
There was a problem hiding this comment.
it is a purpose of this work
fregataa
force-pushed
the
fix/BA-8671-self-password-clears-flag
branch
from
October 22, 2026 01:52
841f464 to
e034e23
Compare
fregataa
marked this pull request as ready for review
October 22, 2026 02:07
fregataa
marked this pull request as draft
October 22, 2026 02:08
…n password updateUserV2 now writes need_password_change=false along with a new password, as the auth password-change path does, and rejects a request that sets a new password with needPasswordChange=true. The rule lives in the resolver next to the self-editable field check; adminUpdateUserV2 keeps the flag as it is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fregataa
force-pushed
the
fix/BA-8671-self-password-clears-flag
branch
from
October 22, 2026 02:16
e034e23 to
88bcf5d
Compare
fregataa
marked this pull request as ready for review
October 22, 2026 02:26
jopemachine
approved these changes
Oct 22, 2026
Contributor
|
The backport to CI on it fails until the markers are resolved; check out its branch, fix, push, and merge it by hand (auto-merge is not enabled for conflicted backports). |
Contributor
|
The backport to CI on it fails until the markers are resolved; check out its branch, fix, push, and merge it by hand (auto-merge is not enabled for conflicted backports). |
fregataa
added a commit
that referenced
this pull request
Oct 22, 2026
fregataa
added a commit
that referenced
this pull request
Oct 22, 2026
Merged
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
updateUserV2(own account) now writesneed_password_change=falsealong with a new password, the same as the auth password-change path. Before, onlypassword_changed_atchanged and the password-change banner stayed.needPasswordChange: trueonupdateUserV2is rejected withUserModificationBadRequest.adminUpdateUserV2and REST v2update_userkeep the flag as it is.Test plan
tests/component/user/test_update_user_v2.pyneedPasswordChange: trueis rejected and nothing changesResolves BA-8671
🤖 Generated with Claude Code