]> git.koha-community.org Git - koha.git/commit
Bug 27760: Add stash_overrides helper
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 25 Feb 2021 12:35:28 +0000 (09:35 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 4 May 2021 12:22:02 +0000 (14:22 +0200)
commitc2cc6b401a286523dd5585520169a3da708d2f3b
tree93a20ace12888eb1a8a4127d1b387abc13d0976b
parent8fe090ffe3ba8e2ecff3011ef1b967fcc198bada
Bug 27760: Add stash_overrides helper

This patch adds a simple helper that reads the x-koha-override request
header, and processes it to stash a hashref with the passed overrides.

No check on the overrides themselves is done, as they should be
validated using the OpenAPI spec.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/auth_authenticate_api_request.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/REST/Plugin/Query.pm
t/Koha/REST/Plugin/Query.t