Improve performance of retrieving Users and their Rights on Programs

Description

As part of a plan to improve performance: https://openlmis.atlassian.net/wiki/x/YBvYBg

AC:

  • make a /api/users/{id}/facilities resource - this will be the successor to /api/users/{id}/supervisedFacilities

    • mark /api/users/{id}/supervisedFacilities as deprecated (in RAML), point them to this new user sub-resource

    • when requested without query parameters it should return a set of facilities, where facility is: {id: ..., name: ...}

    • return in 500ms or less for 90% of requests for Administrator user of demo-data on test

  • change /api/users/{id}/programs to return a single set of user's programs (don't separate by home / supervised)

    • when requested without query parameters it should return a set of programs, not broken down or denoted as home or supervised

    • support the query parameter forHomeFacility, when true the list returned will only be the user's facilities which are home facilities, when false the list will only be supervised facilities. This parameter should not be required.

    • return in 250ms or less for 90% of requests for Administrator user of demo-data on test (without the parameter set)

Done

Assignee

Chongsun Ahn

Reporter

Josh Zamor

Labels

Epic Link

Components

Sprint

None

Fix versions

Priority

Major