Say Goodbye to OpenMRS login location selection
Week 11 [July 24, 2018 — July 30, 2018]
Yes, now the time to say Goodbye to the location selector from the OpenMRS Login screen. Just log in with your login credentials such as username and password only!
The actual OpenMRS login page contains the location selector with the login credentials section to assign the users to the location during the login. So the user can select any location from the location selector to enter the OpenMRS. The location will be stored in the session and will be used in the further activities.
Now, I have added the solution to assign the users for a location through the location user property. So the user will have a location property, and it will be automatically fetched from the user property during each login. It will be assigned as the user login location into the session also.
This feature will be executed in these following ways,
- When the user requests the login page, it doesn’t contain the location selector.
- When the user enters the login credentials, then it will check for the location user property
- If the user has the location user property, then the login location will be fetched from that value.
- If the user hasn’t the location user property, then the login page will be redirected to the usual login screen to select the location property again.
If the implementers want to remove this feature form their implementations to have the usual login screen, just need to delete the global property named as “referenceapplication.locationUserPropertyName” form their systems.
So the end would be,
OpenMRS can remember your location now !