From 861d7ee8f4f3cbee9b3b8d4ff2c3c8e063e6f42c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johanna=20R=C3=A4is=C3=A4?= Date: Mon, 17 Mar 2025 12:34:00 +0200 Subject: [PATCH] Bug 38905: change permissions for item creation and modification This patch changes the permissions to edit_items for item creation and modification via the API. Test plan: 1) Apply the patch 2) prove t/db_dependent/api/v1/biblios.t Sponsored-by: Koha-Suomi Oy Signed-off-by: Jan Kissig --- api/v1/swagger/paths/biblios.yaml | 4 ++-- t/db_dependent/api/v1/biblios.t | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/v1/swagger/paths/biblios.yaml b/api/v1/swagger/paths/biblios.yaml index 89252ce9f1..4f301fc911 100644 --- a/api/v1/swagger/paths/biblios.yaml +++ b/api/v1/swagger/paths/biblios.yaml @@ -603,7 +603,7 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - editcatalogue: edit_catalogue + editcatalogue: edit_items "/biblios/{biblio_id}/items/{item_id}": put: x-mojo-to: Biblios#update_item @@ -660,7 +660,7 @@ $ref: "../swagger.yaml#/definitions/error" x-koha-authorization: permissions: - editcatalogue: edit_catalogue + editcatalogue: edit_items "/biblios/{biblio_id}/pickup_locations": get: x-mojo-to: Biblios#pickup_locations diff --git a/t/db_dependent/api/v1/biblios.t b/t/db_dependent/api/v1/biblios.t index d0e809dfec..b5b5b030db 100755 --- a/t/db_dependent/api/v1/biblios.t +++ b/t/db_dependent/api/v1/biblios.t @@ -1910,7 +1910,7 @@ subtest 'add_item() tests' => sub { value => { borrowernumber => $patron->borrowernumber, module_bit => 9, - code => 'edit_catalogue' + code => 'edit_items' } } ); @@ -1973,7 +1973,7 @@ subtest 'update_item() tests' => sub { value => { borrowernumber => $patron->borrowernumber, module_bit => 9, - code => 'edit_catalogue' + code => 'edit_items' } } ); -- 2.39.5