NMS-20107: versioned group management API and PrimeVue Manage Groups page - #8714
Open
joseanesONMS wants to merge 6 commits into
Open
NMS-20107: versioned group management API and PrimeVue Manage Groups page#8714joseanesONMS wants to merge 6 commits into
joseanesONMS wants to merge 6 commits into
Conversation
…page Adds /api/v2/groups (list/get/create/update, rename, delete), admin-only via Spring Security rules plus in-code checks, wrapping GroupManager so groups.xml stays the system of record. The member list order is preserved end to end — it drives the notification escalation order — and fields the API does not expose (default-map) survive updates. Requests are validated up front (name and comment markup, members must exist, duty schedule grammar with overnight ranges legal) and applied to a detached copy, so rejected requests leave no partial state. Unlike the legacy page, which only hid the buttons, the Admin group is protected server-side, renames follow the on-call roles' membership-group references, and deletes are rejected while roles still reference the group instead of leaving dangling references. The Manage Groups page (ui/#/admin/groups) visualizes the API: groups table, editor with an ordered member list (move up/down), rename and delete dialogs with the system group disabled. The menu entry now points at the new page. 13 integration tests and 8 store tests.
Fixes from self-review. Duty schedules with begin after end are rejected for new entries — DutySchedule.isInSchedule compares within one calendar day, so an overnight range never matches and would silently take the group off duty; strings already stored on the record keep round-tripping so hand-edited files never make a group uneditable. Delete and rename go through GroupService so the DB category authorizations are cleared and migrated as the legacy page did (deleting a group otherwise leaked its authorizations to a future group reusing the name). Renames re-point the on-call roles in memory first, so the rename's single save persists groups and roles together, with the role changes reverted on failure. Both v2 services now serialize on a shared monitor because user mutations cascade into GroupManager. Dot-segment names are rejected, and clearing the comments field works (an explicit empty string clears; an omitted key still preserves). Adds a collapsed "?" help panel explaining what groups are for and how to use the page, including the escalation-order and rename semantics.
… dialogs Same treatment as the users page: group mutations return the server's error message and the editor/rename dialogs show it inline instead of relying on a toast hidden behind the modal; the group name and comments fields get live client-side checks mirroring the server rules, and groups with names the security filter cannot address in a URL path show a file-managed note in place of row actions.
A hand-edited groups.xml can reference a user that no longer exists; since the editor always sends the full member list, the unknown-user check made such groups uneditable. Members already stored on the group now skip the existence check, matching the duty-schedule and on-call-schedule handling; members new to a request must still resolve to a real user.
The name and comments regexes now scan for forbidden characters instead of full-string matches a newline could bypass. Hand-edited comments containing markup characters are grandfathered while unchanged — server-side and in the editor — so such groups stay editable; changed comments are still validated. The rename rollback no longer re-points on-call roles in memory when the rename already persisted to groups.xml (only the DB category migration failed), which would have diverged memory from the file; that case now reports the partial failure explicitly.
Author
|
@marshallmassengill could you take a review pass when you get a chance? |
…uHeaderIT The menu entry now lands on the Vue page, so the smoke test waits for its page title instead of the legacy JSP breadcrumb.
joseanesONMS
force-pushed
the
jira/NMS-20107-manage-groups-primevue
branch
from
July 31, 2026 01:24
deec164 to
02faec4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NMS-20107: a versioned group management API (
/api/v2/groups) and a PrimeVue Manage Groups page that is a straight visualization of it; independent companion to #8698.groups.xmlstays the system of record via the existingGroupManager, with member order (the notification escalation order) anddefault-mappreserved end to end.GroupServiceso the DB category authorizations are migrated or cleared as the legacy page did.groups.xmlnever touched) plus Vitest store/dialog tests; verified end to end including hand-editinggroups.xmlbetween API calls.