[OpenNMS/opennms] 36c773: NMS-20106: stop cumulative HTML-escaping of full n...
joseanesONMS via opennms-cvs <[email protected]>
| Newsgroups | gmane.network.opennms.cvs |
|---|---|
| Message-ID | <OpenNMS/opennms/push/refs/heads/jira/NMS-20106-manage-users-primevue/[email protected]> |
Branch: refs/heads/jira/NMS-20106-manage-users-primevue
Home: https://github.com/OpenNMS/opennms
Commit: 36c773120af8b6a78033355db03d94d029b79939
https://github.com/OpenNMS/opennms/commit/36c773120af8b6a78033355db03d94d029b79939
Author: Jose Anes <[email protected]>
Date: 2026-08-21 (Fri, 21 Aug 2026)
Changed paths:
M opennms-webapp-rest/src/main/java/org/opennms/web/rest/v2/UsersRestService.java
M opennms-webapp-rest/src/test/java/org/opennms/web/rest/v2/UsersRestServiceIT.java
M ui/src/lib/adminValidation.ts
M ui/tests/lib/adminValidation.test.ts
Log Message:
-----------
NMS-20106: stop cumulative HTML-escaping of full name and contacts on write
copyOf rebuilt the user through the config-model setters (setFullName,
Contact.setInfo), which run a non-idempotent Encode.forHtml, so every write —
a password change or any unrelated edit — re-escaped the stored value one
layer deeper (O'Brien -> O'Brien -> O&#39;Brien ...). Clone via a JAXB
round-trip (field access bypasses the sanitizing setters), and in applyDto only
write full name / email / pager-email through the setter when the value
actually changed. New IT stores escapable values and asserts a password change
and an unrelated edit leave them byte-for-byte unchanged.
Also fixes the build-ui lint failure (arrow-parens/quote style).
Commit: 43750b6d5e932003bf160f683f0b6f56a825a554
https://github.com/OpenNMS/opennms/commit/43750b6d5e932003bf160f683f0b6f56a825a554
Author: Jose Anes <[email protected]>
Date: 2026-08-21 (Fri, 21 Aug 2026)
Changed paths:
M opennms-webapp-rest/src/main/java/org/opennms/web/rest/v2/UsersRestService.java
M opennms-webapp-rest/src/main/java/org/opennms/web/rest/v2/model/UserDto.java
M opennms-webapp-rest/src/test/java/org/opennms/web/rest/v2/UsersRestServiceIT.java
M ui/src/components/ManageUsers/UserEditorDialog.vue
M ui/src/types/userAdmin.ts
M ui/tests/components/AdminDialogs/UserEditorDialog.test.ts
Log Message:
-----------
NMS-20106: bring the Manage Users editor to parity with the legacy page
The new page (now the menu target) edited only name, email, pager-email,
comments and roles, dropping the legacy modifyUser.jsp fields that notifd
relies on. Surface the rest so the menu no longer routes to a lesser editor:
- API: UserDto gains work/mobile/home phone and numeric/text pager service +
PIN; UsersRestService maps them to the workPhone/mobilePhone/homePhone and
numericPage/textPage contacts (info + serviceProvider), writing through the
sanitizing setters only when a value changed. tui-pin, time-zone-id and duty
schedules were already on the DTO.
- UI: the editor adds phones, pager service/PIN, telephone PIN, a time-zone
picker, and an add/remove duty-schedule list.
ITs cover create + partial-update round-trips of the new contacts; editor
tests cover load/save of the new fields and the duty-schedule list.
Compare: https://github.com/OpenNMS/opennms/compare/2dad16f79d3e...43750b6d5e93
To unsubscribe from these emails, change your notification settings at https://github.com/OpenNMS/opennms/settings/notifications
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/wiki/index.php?page=MailingListFaq
opennms-cvs mailing list
To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-cvs