Uploaded image for project: 'Nuxeo Elements'
  1. Nuxeo Elements
  2. ELEMENTS-1426

Display an error when trying to create a user which already exists

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.0
    • Fix Version/s: 2.4.55, 3.0.9
    • Component/s: UI
    • Release Notes Summary:
      An error is displayed when a newly created user already exists.
    • Backlog priority:
      650
    • Team:
      UI
    • Sprint:
      UI - 2021-11, UI - 2021-12, UI - 2021-13, UI Cooldown - 2021-11, UI Cooldown - 2021-12

      Description

      Steps to reproduce:

      1. create a first user whose username is jdoe
      2. go back to the user creation form
      3. fill the fields and use the same value "jdoe" for the username
      4. click on the Create button and observe that no error is displayed

      The problem can be observed either when
      1) you do not define a password. In this case,

      • you have this message in the browser console
        POST http://localhost:8080/nuxeo/api/v1/automation/User.Invite 500
        Operation request failed: Error
        
      • you have this error in the server logs
        ERROR [WebEngineExceptionMapper] org.nuxeo.ecm.platform.usermanager.exceptions.UserAlreadyExistsException: Failed to invoke operation: User.Invite, Failed to invoke operation User.Invite, null
        org.nuxeo.ecm.platform.usermanager.exceptions.UserAlreadyExistsException: Failed to invoke operation: User.Invite, Failed to invoke operation User.Invite, null
        

        => the error HTTP 500 is now replaced by a HTTP 409 thanks to NXP-29793

      2) you define a password: In this case, only an error is displayed in the browser console

      POST http://localhost:8080/nuxeo/api/v1/user 409
      Resource request failed: User already exists
      

      Expected behavior: in both cases, a message should warn the current actor that the user already exists.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 3 days, 1 hour, 24 minutes
                  1w 3d 1h 24m