Skip to content

refactor(#184): consistent account menu via a single shared user-menu fragment#185

Merged
dfcoffin merged 1 commit into
mainfrom
feature/184-shared-user-menu
Jun 9, 2026
Merged

refactor(#184): consistent account menu via a single shared user-menu fragment#185
dfcoffin merged 1 commit into
mainfrom
feature/184-shared-user-menu

Conversation

@dfcoffin

@dfcoffin dfcoffin commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Presents account actions (Change Password, Logout) identically in both portals, and removes the per-navbar duplication. Closes #184.

Previously the admin navbar had both in the top-right user dropdown, but the customer navbar had Logout in the dropdown and Change Password as a top-level link — inconsistent.

Changes

  • New shared userMenu fragment: username ▾ → Change PasswordLogout. Change Password resolves to the role-appropriate page via sec:authorize (/custodian/password for ROLE_CUSTODIAN, else /customer/password); Logout is the CSRF POST; rendered only when authenticated.
  • header, customerHeader, custodianHeader all th:replace this single fragment (DRY) instead of hand-rolling their own dropdowns.
  • Removed the customer's top-level "Change Password" nav link — now in the dropdown, matching the admin.

Verification

Live: both customer and admin dropdowns show Change Password (role-correct path) + Logout; the customer top-level link is gone; both password pages reachable (200). datacustodian suite 160/0.

🤖 Generated with Claude Code

… navbar fragment

Account actions are now presented identically across both portals, per best practice
(account actions live in the top-right user menu) and DRY.

- New shared `userMenu` fragment (username dropdown -> Change Password -> Logout). Change
  Password resolves to the role-appropriate page via sec:authorize (/custodian/password for
  ROLE_CUSTODIAN, else /customer/password); Logout is the CSRF POST. Shown only when authenticated.
- header, customerHeader, and custodianHeader now all th:replace this one fragment instead of
  each hand-rolling its own dropdown.
- Removed the customer's top-level "Change Password" nav link (now in the dropdown, matching admin).

Verified live: customer and admin dropdowns both show Change Password (role-correct path) + Logout;
the customer top-level link is gone; /customer/password and /custodian/password reachable.
datacustodian suite 160/0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dfcoffin dfcoffin merged commit 06666dc into main Jun 9, 2026
4 checks passed
@dfcoffin dfcoffin deleted the feature/184-shared-user-menu branch June 9, 2026 02:57
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.

Portal navbars: consistent account menu (Change Password + Logout) via a single shared user-menu fragment

1 participant