Currently, the ability to Merge Patrons is lumped under the "Add, modify, and view patron information" (edit_borrowers). Merging patron records is more powerful than the ability to add/modify/view a patron record. My request is to have this as a separate permission, similar to that of delete_borrowers.
+1
*** Bug 38754 has been marked as a duplicate of this bug. ***
Created attachment 186301 [details] [review] Bug 35830: Add merge_borrowers subpermission Merging patrons only required edit_borrowers permission but would result in a patron deletion. This patch requires a new merge_borrowers subpermission To test: 1. Give a patron the following permissions catalogue, edit_borrowers, list_borrowers 2. Log into the staff interface as the patron 3. Do a patron search and select 2 patrons 4. Click merge patron - success - a patron got deleted 5. Apply patch, updatedatabase and restart_all 6. Repeat steps 3 and 4 - you can't 7. Add the new permission for merge_borrowers 8. Repeat steps 3 and 4 - now you can 9. prove t/Koha/Auth/Patrons.t
Created attachment 186302 [details] [review] Bug 35830: Add merge_borrowers subpermission Merging patrons only required edit_borrowers permission but would result in a patron deletion. This patch requires a new merge_borrowers subpermission To test: 1. Give a patron the following permissions catalogue, edit_borrowers, list_borrowers 2. Log into the staff interface as the patron 3. Do a patron search and select 2 patrons 4. Click merge patron - success - a patron got deleted 5. Apply patch, updatedatabase and restart_all 6. Repeat steps 3 and 4 - you can't 7. Add the new permission for merge_borrowers 8. Repeat steps 3 and 4 - now you can 9. prove t/Koha/Auth/Patrons.t Sponsored-by: CLAMS
Setting to needs sign off for feedback. I know I need to add the atomic update in a separate commit. I think this might also need to update the database to give the new merge_borrowers permission to everyone who currently has the delete_borrowers permission. Or should it just give merge_borrowers to everyone with edit_borrowers because that's the current way it is?
Created attachment 187060 [details] [review] Bug 35830: Add merge_borrowers subpermission Merging patrons only required edit_borrowers permission but would result in a patron deletion. This patch requires a new merge_borrowers subpermission To test: 1. Give a patron the following permissions catalogue, edit_borrowers, list_borrowers 2. Log into the staff interface as the patron 3. Do a patron search and select 2 patrons 4. Click merge patron - success - a patron got deleted 5. Apply patch, updatedatabase and restart_all 6. Repeat steps 3 and 4 - you can't 7. Add the new permission for merge_borrowers 8. Repeat steps 3 and 4 - now you can 9. prove t/Koha/Auth/Patrons.t Sponsored-by: CLAMS
I added an insert statement to the atomic update to add the merge_borrowers permission for all users who currently have the edit_borrowers permission This makes the behavior for for existing installations consistent with the current functionality.