OLMIS-2811 Add API endpoint for user’s permission strings To improve performance, there is a design to generate and store a list of permissi…
OLMIS-2811 Add API endpoint for user’s permission stringsTo improve performance, there is a design to generate and store a list of permission strings associated with a user. They are either rightName (for direct), rightName|facilityId (for fulfillment) or rightName|facilityId|programId (for supervision). Because finding and getting back a User object is too slow, just checking the user exists is sufficient, especially since there is a separate search done for the permission strings. An ETag is also added in the controller with a hash of the set of strings. The permission strings are generated during save time, using JPA/Hibernate (PermissionString and PermissionStringRepository). A performance test is added to fail the performance CI job if 90% of tests do not return in less than 0.5 seconds.