Skip to content

feat(#180): self-service password change for customers and admins#182

Merged
dfcoffin merged 1 commit into
mainfrom
feature/180-customer-change-password
Jun 9, 2026
Merged

feat(#180): self-service password change for customers and admins#182
dfcoffin merged 1 commit into
mainfrom
feature/180-customer-change-password

Conversation

@dfcoffin

@dfcoffin dfcoffin commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Lets any signed-in account change its own password, in both portals. Closes #180.

Design (DRY)

A single PasswordController serves both /customer/password and /custodian/password, sharing one change routine — only the rendered view (customer vs custodian navbar) differs. Accounts are unified RetailCustomerEntity rows distinguished by role, so the logic is identical.

  • Verifies the current password (BCrypt) before accepting the new one; requires new == confirm and non-blank; persists the BCrypt-encoded new password.
  • A user can change only their own account (resolved from the authenticated principal). @PreAuthorize("isAuthenticated()").
  • Nav: "Change Password" in the customer navbar and the custodian user dropdown.

Verification

Live: customer and admin change password; wrong-current and mismatch rejected with a clear message; the new password logs in and the old one is rejected; admin lands back on /custodian/home. datacustodian suite 160/0.

🤖 Generated with Claude Code

…ngle PasswordController)

A signed-in account can change its own password. One DRY PasswordController serves both
portals — /customer/password and /custodian/password — sharing a single change routine;
only the rendered view (customer vs custodian navbar) differs. Accounts are unified
RetailCustomerEntity rows by role, so the logic is identical.

- Verifies the current password (BCrypt) before accepting the new one; requires new ==
  confirm and non-blank; persists the BCrypt-encoded new password. A user can change only
  their own account (resolved from the authenticated principal). @PreAuthorize isAuthenticated.
- Nav: "Change Password" in the customer navbar and the custodian user dropdown.
- Templates: customer/password.html, custodian/password.html.

Verified live: customer and admin change password; wrong-current and mismatch rejected;
new password logs in, old password rejected; admin lands back on /custodian/home.
datacustodian suite 160/0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dfcoffin dfcoffin merged commit dabf749 into main Jun 9, 2026
4 checks passed
@dfcoffin dfcoffin deleted the feature/180-customer-change-password branch June 9, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Customer self-service: change own password

1 participant