Details
-
New Feature
-
Status: Closed
-
Should
-
Resolution: Fixed
-
None
-
None
-
Low
Description
Right now the endpoint to set session location is part of RA: `POST /openmrs/ws/rest/v1/appui/session`. It should be possible to set the session location via a POST to the REST API, for non-RA users.
So the primary todo here is to add "location" to the session resource, allowing getting and setting this RESTfully on this resource:
- Get method: `session.add("location", ConversionUtil.convertToRepresentation(Context.getUserContext().getLocation(), rep));`
- Post method:
- Set on usercontext: `Context.getUserContext.setLocation(...);`
- As a short-term fix for compatibility with appui, do what it does directly: `session.setAttribute("emrContext.sessionLocationId", location.getId());`
The other component is figuring out what to do with the user of the "emrContext.sessionLocationId" session attribute in appui and the reference application. Some options:
- Change the appui UiSessionContext from using this session attribute to just using the top using the UserContext location
- Do some sanity checking to see if there are any other dependencies on a session attribute named "emrContext.sessionLocationId" (eg. github search)
Gliffy Diagrams
Attachments
Issue Links
- is depended on by
-
O3-109 Login flow should have Location select as second page
-
- Done
-