]> 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)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 1 Feb 2021 15:36:38 +0000 (16:36 +0100)
commitea0696831fadd4b633c90fc7ccd29144e9a6b87a
treef9643454fc05c39a189b90dc2fd7ceb6f1f56d42
parent2af262e1f2fac89dada52e60c0653f0ad8ba987a
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>
Koha/REST/V1/Clubs/Holds.pm