Bugzilla – Attachment 179382 Details for
Bug 38905
Updating an item of a bibliographic record should use edit_items instead edit_catalogue permission
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38905: change permissions for item creation and modification
0001-Bug-38905-change-permissions-for-item-creation-and-m.patch (text/plain), 2.15 KB, created by
Johanna Räisä
on 2025-03-17 10:39:48 UTC
(
hide
)
Description:
Bug 38905: change permissions for item creation and modification
Filename:
MIME Type:
Creator:
Johanna Räisä
Created:
2025-03-17 10:39:48 UTC
Size:
2.15 KB
patch
obsolete
>From 33f0d3aa93edc0ed563a72118a7fbae04b25f48b Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Johanna=20R=C3=A4is=C3=A4?= <johanna.raisa@gmail.com> >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 >--- > 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.34.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38905
:
179382
|
179449
|
179966
|
179968