GRI-2153: a signed-in user can change their own password #298
No reviewers
Labels
No labels
Area/Backend
Area/Database
Area/Docs
Area/Frontend
Area/Infra
Area/Security
Area/Tests
Area/Tooling
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Lang/Python
Lang/Rust
Lang/Shell
Lang/SQL
Lang/TypeScript
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Routing
Auto
Routing
Hold
Routing
Human
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage!298
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/GRI-2153-self-service-password-change"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements
PATCH /api/v1/session/passwordagainst Astraea's fail-first tests from PR #290 (crates/server/tests/session_password_integration.rs, now merged in as part of this branch's history).Confirms the contract those tests assumed, with no change:
current_password,new_password,new_password_confirmation;400 wrong_current_password/400 password_mismatch/400 weak_password; and the one deliberate departure from the admin reset (GRI-2105) — the session making the change survives it, only every other session on the account ends.Part of #231 (server side only; the panel screen is still to do, so #231 stays open).
Testing
-> 6 passed; 0 failed.
Also ran the full
servertest crate against the same database(
cargo test --package server --tests --no-fail-fast -- --include-ignored):225/228 lib tests and every integration suite pass; the 3 failures
(
pdf::tests::renders_a_real_two_page_pdf_with_default_optionsand twopptx_videotests) are pre-existing, unrelated to this change — this hosthas no
pdftoppmbinary installed.cargo fmt --checkandcargo clippy --package server --tests -- -D warningsboth clean../scripts/local-gates.sh --rust-onlypasses (that script does not setSIGNAGE_TEST_DATABASE_URL, so its owncargo testrun does not exercisethe new route against a real database — the command above does).
Approved on
63a8139. Contract matches #290; checks run cheap-first; the acting session survives, other sessions end; CI runs the 6 integration tests (SIGNAGE_TEST_DATABASE_URL is set in ci.yml). Minor, not blocking: the password update and the session delete are two statements, not one transaction. I changed "Closes #231" to "Part of #231": there is no panel screen yet, so a user still cannot change their own password.