Uploaded image for project: 'Nuxeo Java Client'
  1. Nuxeo Java Client
  2. JAVACLIENT-111

Add missing password and tenantId field to UserProperties

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 1.2, 2.4
    • Component/s: API

      Description

      The current implementation does not allow to create a user with all his attributes as it is possible to do with a REST call

      curl -X POST 'http://demo.nuxeo.com/nuxeo/api/v1//user?' -H 'Nuxeo-Transaction-Timeout: 3' -H 'X-NXproperties: *' -H 'X-NXRepository: default' -H 'content-type: application/json' -d '{ "entity-type": "user", "id": "Bill1", "properties": { "lastName": "Murray", "username": "Bill1", "email": "bill@exemple.com", "company": "Nux", "firstName": "Bill", "password": "Nux2222", "groups": [ "members", "administrators" ] } }'
      

      Password and tenantId are the missing field, as it is shown in the code below:

      		User user = new User();
      		List<String> groups = new ArrayList<>();
      		groups.add("members");
      		user.setEmail("bill@example.com");
      		user.setFirstName("Bill");
      		user.setLastName("Murray");
      		user.setUserName("bmurray2");
      		user.setCompany("Movies");
      		user.setGroups(groups);
      
      		nuxeoClient.getUserManager().createUser(user);
      

      User and UserProperties API must be updated.

      Ideally we should keep the API open if it is needed to create users with a custom schema.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours
                  3h