The previous user model was not yet ready for use by us, and the registration/login flows did not really match those one might expect in a hospital.
Proposed changes
Change the user model to what @noworneverev suggested in the ER diagram, plus an optional ForeignKey to a Ward (so we can (in the future) assign personnel to wards):
Rework the auth flow. This is the main thing you should test when reviewing this PR.
log in as a user that is at least STATION_MANAGEMENT (so no MEDICAL_PERSONNEL). At the top right, go to "create user".
you should be able to create a user with permissions less than your own.
in the console window you are running the server in, a mock email will appear. Log out of YCMS, then open the link contained in the email in the browser.
set a password
you should now be able to log in as that user
feel free to also test the password forgotten feature!
Side effects
lots of changes to lots of files because these changes have lots of implications on other stuff, sorry....
Short description
The previous user model was not yet ready for use by us, and the registration/login flows did not really match those one might expect in a hospital.
Proposed changes
ForeignKey
to aWard
(so we can (in the future) assign personnel to wards):STATION_MANAGEMENT
(so noMEDICAL_PERSONNEL
). At the top right, go to "create user".Side effects
Resolved issues
Fixes: #12