From 7ed5fde7d6ed90c4d91ec3ec2d6fd89020c5290d Mon Sep 17 00:00:00 2001 From: "Donald F. Coffin" Date: Mon, 8 Jun 2026 22:34:11 -0400 Subject: [PATCH] refactor(#184): consistent account menu via a single shared user-menu 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 --- .../resources/templates/fragments/layout.html | 73 +++++++------------ 1 file changed, 27 insertions(+), 46 deletions(-) diff --git a/openespi-datacustodian/src/main/resources/templates/fragments/layout.html b/openespi-datacustodian/src/main/resources/templates/fragments/layout.html index bb85590a..d01cc5b0 100644 --- a/openespi-datacustodian/src/main/resources/templates/fragments/layout.html +++ b/openespi-datacustodian/src/main/resources/templates/fragments/layout.html @@ -27,6 +27,30 @@ + + +