Bug 36988

Summary: PUT for patrons requires full borrowers permission, but should only require 'edit_borrowers'
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: REST APIAssignee: Bugs List <koha-bugs>
Status: Needs Signoff --- QA Contact:
Severity: normal    
Priority: P5 - low CC: kyle, rcoert, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37228
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
Bug 36988: Update unit tests
Bug 36988: Change permission
Bug 36988: Update unit tests
Bug 36988: Update unit tests

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?