SORMAS-Project
SORMAS-Project copied to clipboard
Connection to the server is lost and an 'endless' loop of errors is displayed in the server logs when trying to save a user as 'admin+surveillance officer'
Bug Description
When trying to create a new user, or edit an existing one, and give it the user roles of admin + surveillance officer, a loop of errors is displayed in the logs and the connection to the server is lost.
Steps to Reproduce
- Logged in with an admin, either create a new user or edit an existing one and give it the user roles of admin+surveillance officer;
- Click save in the form.
Actual Behavior
In the UI, the page loads for a long time, until the notification 'Connection to the server lost' appears.
In the server logs, the system displays errors in a loop.
Expected Behavior
No errors should be thrown.
Screenshots
System Details
- Device: Windows 10
- SORMAS version: 1.75.0-SNAPSHOT()
- Android version/Browser: Chrome
- Server URL: local machine
- User Role: admin; admin+surveillance officer
Additional Information
Likely related to the User.UserListener.beforeAnyUpdate
logic. It likely has to be changed to afterAnyUpdate
(PostPersist
, PostUpdate
).
In this bug is an other bug also fixed that I thought is connected :
- login with a user that has Admin right
- go to User page and add "Surveillance Officer" right
- save the user
- go back and remove right "Surveillance Officer"
- save user
- pop up view is displayed and click yes
Before It was a error that the user was already saved
Now No error is showed and the user is saved
Verified ticket on the local machine using the latest version of SORMAS from the development branch - 1.75.0-SNAPSHOT(7791d91).