]> git.koha-community.org Git - koha.git/commit
Bug 27330: Return 403 if club has no enrollments
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 4 Jan 2021 14:24:51 +0000 (11:24 -0300)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Thu, 4 Mar 2021 17:26:32 +0000 (17:26 +0000)
commit93f8d4c7c89b03fc29d60159279408adbdcbde56
tree7ac97bfeb50006f87ce44761ff4bcf7031e15ff4
parent23df724996cf10e0b53fa320935fe652aae32324
Bug 27330: Return 403 if club has no enrollments

This patch makes the controller script return a 403 as it should [1]
instead of a plain 500.

To test:
1. Apply the regressions tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/clubs_holds.t
=> FAIL: Tests fail!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

[1] https://www.restapitutorial.com/httpstatuscodes.html

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ea0696831fadd4b633c90fc7ccd29144e9a6b87a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 4f3d15c8d2e470e7e1f1175879a95d0b9e53a5c7)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Koha/REST/V1/Clubs/Holds.pm