Bug 34287: Add check on public availability endpoint
A quick check for patron equals current user in the public availability endpoint. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
bc2fa03d5c
commit
a5f3815c65
2 changed files with 4 additions and 3 deletions
|
@ -411,3 +411,5 @@
|
|||
description: Under maintenance
|
||||
schema:
|
||||
$ref: "../swagger.yaml#/definitions/error"
|
||||
x-koha-authorization:
|
||||
allow-owner: true
|
||||
|
|
|
@ -342,9 +342,8 @@ subtest 'get_availability' => sub {
|
|||
$t->get_ok("/api/v1/public/checkouts/availability?item_id=$item1_id&patron_id=$patron_id")->status_is(401);
|
||||
|
||||
# Only allow availability lookup for self
|
||||
$t->get_ok(
|
||||
"//$userid:$password@/api/v1/public/checkouts/availability?item_id=$item1_id&patron_id=$patron_id"
|
||||
)->status_is(403);
|
||||
$t->get_ok("//$userid:$password@/api/v1/public/checkouts/availability?item_id=$item1_id&patron_id=$patron_id")
|
||||
->status_is(403);
|
||||
|
||||
# All ok
|
||||
$t->get_ok(
|
||||
|
|
Loading…
Reference in a new issue