]> git.koha-community.org Git - koha.git/commit
Bug 30663: Add x-koha-override options to /suggestions
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 3 May 2022 14:20:46 +0000 (11:20 -0300)
committerVictor Grousset/tuxayo <victor@tuxayo.net>
Sat, 25 Jun 2022 02:48:54 +0000 (04:48 +0200)
commitb1404ce298f581327418f489e1631da479efe55e
tree7549ad62b8d9a43ffe1b52866ccb29cdad72d4c7
parent9794624aa43594b2a4dc1c1325cd269ae4b66a0d
Bug 30663: Add x-koha-override options to /suggestions

This patch adds the x-koha-override header parameter to the route that
is used to create suggestions, POST /suggestions.

The idea is that adding suggestions will be rejected under certain
conditions unless x-koha-override is passed with appropriate values. The
added overrides are:

* any
* max_total
* max_pending

Tests are added for the expected behavior.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 25317416e62a267a4f4b06cf35f37ad38e04b40a)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
api/v1/swagger/paths/suggestions.yaml
t/db_dependent/api/v1/suggestions.t