Bugzilla – Attachment 179449 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
Bug-38905-change-permissions-for-item-creation-and.patch (text/plain), 2.20 KB, created by
Jan Kissig
on 2025-03-18 12:33:45 UTC
(
hide
)
Description:
Bug 38905: change permissions for item creation and modification
Filename:
MIME Type:
Creator:
Jan Kissig
Created:
2025-03-18 12:33:45 UTC
Size:
2.20 KB
patch
obsolete
>From 861d7ee8f4f3cbee9b3b8d4ff2c3c8e063e6f42c 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 >Signed-off-by: Jan Kissig <bibliothek@th-wildau.de> >--- > 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
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