Bug 38905

Summary: Updating an item of a bibliographic record should use edit_items instead edit_catalogue permission
Product: Koha Reporter: Michaela Sieber <michaela.sieber>
Component: REST APIAssignee: Johanna Räisä <johanna.raisa>
Status: Pushed to main --- QA Contact: Paul Derscheid <paul.derscheid>
Severity: enhancement    
Priority: P5 - low CC: bibliothek, clemens.tubach, johanna.raisa, katrin.fischer, paul.derscheid, tomascohen, urho
Version: MainKeywords: rel_24_11_candidate
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.05.00
Circulation function:
Attachments: Bug 38905: change permissions for item creation and modification
Bug 38905: change permissions for item creation and modification
Bug 38905: change permissions for item creation and modification
Bug 38905: change permissions for item creation and modification

Description Michaela Sieber 2025-01-16 10:28:03 UTC
For the API 
https://api.koha-community.org/#tag/biblios/operation/updateBiblioItem

a user must have the permission edit_catalogue

{"permissions":{"editcatalogue":"edit_catalogue"}}

it should be

{"permissions":{"editcatalogue":"edit_items"}}
Comment 1 Oswald Kaipainen 2025-03-14 14:08:25 UTC
Yes! This would be a welcomed change.
Comment 2 Johanna Räisä 2025-03-17 10:39:48 UTC
Created attachment 179382 [details] [review]
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
Comment 3 Jan Kissig 2025-03-18 12:33:45 UTC
Created attachment 179449 [details] [review]
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>
Comment 4 Paul Derscheid 2025-03-31 09:58:09 UTC
Created attachment 179966 [details] [review]
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>
Comment 5 Paul Derscheid 2025-03-31 09:58:53 UTC
Created attachment 179968 [details] [review]
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>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Comment 6 Paul Derscheid 2025-03-31 10:00:01 UTC
I think it makes sense to be less restrictive regarding permissions for this case.
Comment 7 Katrin Fischer 2025-04-22 06:49:44 UTC
Pushed for 25.05!

Well done everyone, thank you!
Comment 8 Michaela Sieber 2025-04-25 09:02:09 UTC
Could this please be backported?