Koha/t/db_dependent/api/v1
Tomas Cohen Arazi ee2931a7b0 Bug 22061: Add a /public namespace that can be switched on/off
This patch adds a check in Koha::REST::V1::Auth::under to catch all
routes that begin with 'public' (inside /api/v1). If they match, and the
RESTPublicAPI syspref is off, then an exception is thrown, rendering a
403 error to the consumer.

Otherwise the routes are processed as usual. This is THE on/off switch
for the public REST API. The target use case: people not wanting an OPAC
or public interaction with the API besides privileged users.

In order to test, the rest of the patches are needed because the only
way to test a route is having it in the spec.

To test:
- Apply the patches
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/auth.t
=> SUCCESS: tests pass!
- Sign off :-D

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-01-28 15:45:54 +00:00
..
acquisitions_vendors.t
auth.t Bug 22061: Add a /public namespace that can be switched on/off 2019-01-28 15:45:54 +00:00
auth_authenticate_api_request.t Bug 22071: Regression tests 2019-01-04 03:13:39 +00:00
cities.t
holds.t
illrequests.t Bug 21835: (QA follow-up) Fix failing test 2018-11-16 17:29:30 +00:00
oauth.t
patrons.t Bug 22107: patrons.t doesn't need to delete existing data 2019-01-11 18:48:51 +00:00
patrons_accounts.t Bug 21786: Unit tests 2019-01-08 15:50:50 +00:00
patrons_password.t Bug 17006: Add /patrons/{patron_id}/password 2019-01-28 15:25:39 +00:00
stockrotationstage.t Bug 11897: Use 'stockrotation' permission for the endpoint 2018-10-09 15:46:06 +00:00