[Bug 1574639] [NEW] [api] NullPointer when inviting a user through the api

Public bug reported:

When trying to send an invite to create a user i receive a null pointer.

This effects both 2.23 and 2.22 (2.22 being the more important version
for me atm :))

Send an invite request to `https://play.dhis2.org/demo/api/users/invite\`
with a payload equivalent to:

{
    "email":"mark@dhis.org",
    "organisationUnits":[{"id":"ImspTQPwCqd"}],
    "dataViewOrganisationUnits":[{"id":"ImspTQPwCqd"}],
    "userCredentials": {}
}

or curl request to run:

curl DHIS 2 Demo - Sierra Leone -u admin:district -d
"{\"email\":\"mark@dhis2.org\",\"organisationUnits\":[{\"id\":\"ImspTQPwCqd\"}],\"dataViewOrganisationUnits\":[{\"id\":\"ImspTQPwCqd\"}],\"userCredentials\":{}}"
-H "Content-Type:application/json"

** Affects: dhis2
     Importance: Undecided
         Status: New

** Tags: api

** Tags added: api

···

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1574639

Title:
  [api] NullPointer when inviting a user through the api

Status in DHIS:
  New

Bug description:
  When trying to send an invite to create a user i receive a null
  pointer.

  This effects both 2.23 and 2.22 (2.22 being the more important version
  for me atm :))

  Send an invite request to
  `https://play.dhis2.org/demo/api/users/invite\` with a payload
  equivalent to:

  {
      "email":"mark@dhis.org",
      "organisationUnits":[{"id":"ImspTQPwCqd"}],
      "dataViewOrganisationUnits":[{"id":"ImspTQPwCqd"}],
      "userCredentials": {}
  }

  or curl request to run:

  curl DHIS 2 Demo - Sierra Leone -u admin:district -d
  "{\"email\":\"mark@dhis2.org\",\"organisationUnits\":[{\"id\":\"ImspTQPwCqd\"}],\"dataViewOrganisationUnits\":[{\"id\":\"ImspTQPwCqd\"}],\"userCredentials\":{}}"
  -H "Content-Type:application/json"

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1574639/+subscriptions

** Changed in: dhis2
     Assignee: (unassigned) => Jim Grace (jimgrace)

···

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1574639

Title:
  [api] NullPointer when inviting a user through the api

Status in DHIS:
  New

Bug description:
  When trying to send an invite to create a user i receive a null
  pointer.

  This effects both 2.23 and 2.22 (2.22 being the more important version
  for me atm :))

  Send an invite request to
  `https://play.dhis2.org/demo/api/users/invite\` with a payload
  equivalent to:

  {
      "email":"mark@dhis.org",
      "organisationUnits":[{"id":"ImspTQPwCqd"}],
      "dataViewOrganisationUnits":[{"id":"ImspTQPwCqd"}],
      "userCredentials": {}
  }

  or curl request to run:

  curl DHIS 2 Demo - Sierra Leone -u admin:district -d
  "{\"email\":\"mark@dhis2.org\",\"organisationUnits\":[{\"id\":\"ImspTQPwCqd\"}],\"dataViewOrganisationUnits\":[{\"id\":\"ImspTQPwCqd\"}],\"userCredentials\":{}}"
  -H "Content-Type:application/json"

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1574639/+subscriptions

Fixed in trunk, 2.23 and 2.22.

** Changed in: dhis2
       Status: New => Fix Committed

···

--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1574639

Title:
  [api] NullPointer when inviting a user through the api

Status in DHIS:
  Fix Committed

Bug description:
  When trying to send an invite to create a user i receive a null
  pointer.

  This effects both 2.23 and 2.22 (2.22 being the more important version
  for me atm :))

  Send an invite request to
  `https://play.dhis2.org/demo/api/users/invite\` with a payload
  equivalent to:

  {
      "email":"mark@dhis.org",
      "organisationUnits":[{"id":"ImspTQPwCqd"}],
      "dataViewOrganisationUnits":[{"id":"ImspTQPwCqd"}],
      "userCredentials": {}
  }

  or curl request to run:

  curl DHIS 2 Demo - Sierra Leone -u admin:district -d
  "{\"email\":\"mark@dhis2.org\",\"organisationUnits\":[{\"id\":\"ImspTQPwCqd\"}],\"dataViewOrganisationUnits\":[{\"id\":\"ImspTQPwCqd\"}],\"userCredentials\":{}}"
  -H "Content-Type:application/json"

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1574639/+subscriptions