Bug 36988 - PUT for patrons requires full borrowers permission, but should only require 'edit_borrowers'
Summary: PUT for patrons requires full borrowers permission, but should only require '...
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: REST API (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-29 17:48 UTC by Nick Clemens (kidclamp)
Modified: 2025-10-30 15:16 UTC (History)
3 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 36988: Change permission (762 bytes, patch)
2024-05-30 10:55 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 36988: Update unit tests (1.39 KB, patch)
2024-05-30 10:56 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 36988: Change permission (760 bytes, patch)
2024-05-30 11:45 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 36988: Update unit tests (1.39 KB, patch)
2024-05-30 11:45 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 36988: Update unit tests (3.81 KB, patch)
2025-10-30 15:16 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2024-05-29 17:48:00 UTC
On the staff side, a user with only edit_borrowers can make changes to a patron account - for PUT access we require borrowers=>1
Comment 1 Kyle M Hall (khall) 2024-05-30 10:55:55 UTC
Created attachment 167270 [details] [review]
Bug 36988: Change permission
Comment 2 Kyle M Hall (khall) 2024-05-30 10:56:01 UTC
Created attachment 167271 [details] [review]
Bug 36988: Update unit tests
Comment 3 Kyle M Hall (khall) 2024-05-30 10:57:05 UTC
Unit tests fail if given only edit_borrowers permission.
Comment 4 Kyle M Hall (khall) 2024-05-30 11:45:42 UTC
Created attachment 167272 [details] [review]
Bug 36988: Change permission
Comment 5 Kyle M Hall (khall) 2024-05-30 11:45:48 UTC
Created attachment 167273 [details] [review]
Bug 36988: Update unit tests
Comment 6 Nick Clemens (kidclamp) 2025-10-30 15:16:01 UTC
Created attachment 188660 [details] [review]
Bug 36988: Update unit tests

These highlight why we may have made this choice. With only 'edit_borrowers' you can make
changes, but you cannot view your changes as you aren't allowed to see other borrowers.

Test now pass, but not sure if this answers the question of why we did it this way, or if there is more
work here. Should you be able to get back the fields that you updated at the least, to confirm your changes? Or
should we send a success with a message that you can't see the data?