Steps to reproduce:
- Log in to web UI as an admin user
- Navigate to Configure OpenNMS / Configure Users, Groups, and On-Call Roles
- Add a new user user.a. No need to fill out details, just do the minimum.
- Add a new group group.a
- Add user user.a to group group.a
- Navigate back to User List
- Click the trash can beside user user.a and confirm intent to delete this user
- User user.a is deleted
- From the user list
- From group group.a
- Group group.a exists but is empty
- Group group.a is also deleted
Further poking leads me to think that a stale copy of the groups configuration gets stored around the time of adding the user to the group and re-marshaled. For instance, if I also rename the built-in Remoting Users group along the way, that group's name reverts to its old value after deleting user.a.
Logging out and back in before deleting the user does not change the outcome. Restarting OpenNMS before deleting the user does.