Bug 38905 - Updating an item of a bibliographic record should use edit_items instead edit_catalogue permission
Summary: Updating an item of a bibliographic record should use edit_items instead edit...
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: REST API (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Johanna Räisä
QA Contact: Paul Derscheid
URL:
Keywords: rel_24_11_candidate
Depends on:
Blocks:
 
Reported: 2025-01-16 10:28 UTC by Michaela Sieber
Modified: 2025-04-25 09:02 UTC (History)
7 users (show)

See Also:
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 (2.15 KB, patch)
2025-03-17 10:39 UTC, Johanna Räisä
Details | Diff | Splinter Review
Bug 38905: change permissions for item creation and modification (2.20 KB, patch)
2025-03-18 12:33 UTC, Jan Kissig
Details | Diff | Splinter Review
Bug 38905: change permissions for item creation and modification (2.20 KB, patch)
2025-03-31 09:58 UTC, Paul Derscheid
Details | Diff | Splinter Review
Bug 38905: change permissions for item creation and modification (2.26 KB, patch)
2025-03-31 09:58 UTC, Paul Derscheid
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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?