Uploaded image for project: 'Webservices REST Module'
  1. Webservices REST Module
  2. RESTWS-878

User Resource refreshes current authenticated user on every user update

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Should
    • Resolution: Fixed
    • None
    • 2.34.0
    • None
    • None

    Description

      Intro

      The REST endpoint for the User CRUD operation: UserResource - .../openmrs/ws/rest/v1/user

      It's used by OpenMRS REST clients like system admin OWA UI - the Manage account page - to save modified User data.

      Bug

      When UserResource is used to save an existing user, the currently authenticated user will have selected login location cleared. Resulting in following flow: change user information, get asked again about login location, go back to manage account, repeat.

      Steps

      1. Go to: https://demo.openmrs.org/openmrs/ 
      2. Login as admin, any location
      3. Go to system administration
      4. Go to Manage Accounts
      5. Open edit for John Smith
      6. Open edit for User details
        1. Optionally change anything, but most UIs won't check for changes
      7. Click save.
      8. Depending on what UI you have:
        1. you may be immediately redirected to the location selection screen
        2. click on Manage Accounts breadcrumb and get redirected to login screen

      Gliffy Diagrams

        Attachments

          Activity

            People

              pwargulak Piotr Wargulak
              pwargulak Piotr Wargulak
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: