Bugzilla – Attachment 190058 Details for
Bug 35830
Add separate permission for Merging Patrons
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35830: [25.05.x] Add merge_borrowers subpermission
Bug-35830-2505x-Add-mergeborrowers-subpermission.patch (text/plain), 2.32 KB, created by
Lucas Gass (lukeg)
on 2025-12-01 15:59:34 UTC
(
hide
)
Description:
Bug 35830: [25.05.x] Add merge_borrowers subpermission
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2025-12-01 15:59:34 UTC
Size:
2.32 KB
patch
obsolete
>From 60793c09b6a1ceffddde102f13a52344298c8a43 Mon Sep 17 00:00:00 2001 >From: Brendan Lawlor <blawlor@clamsnet.org> >Date: Tue, 9 Sep 2025 13:56:15 +0000 >Subject: [PATCH] Bug 35830: [25.05.x] 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 >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: David Cook <dcook@prosentient.com.au> >--- > ...ug_35830_add_merge_borrowers_permission.pl | 24 +++++++++++++++++++ > 1 file changed, 24 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/Bug_35830_add_merge_borrowers_permission.pl > >diff --git a/installer/data/mysql/atomicupdate/Bug_35830_add_merge_borrowers_permission.pl b/installer/data/mysql/atomicupdate/Bug_35830_add_merge_borrowers_permission.pl >new file mode 100755 >index 00000000000..776cdb90053 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/Bug_35830_add_merge_borrowers_permission.pl >@@ -0,0 +1,24 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_success say_info); >+ >+return { >+ bug_number => "35830", >+ description => "Add permission borrowers:merge_borrowers", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ $dbh->do( >+ q{INSERT IGNORE INTO permissions (module_bit, code, description) >+ VALUES (4, 'merge_borrowers', 'Merge patrons')} >+ ); >+ >+ say $out "Added new permission 'merge_borrowers'"; >+ >+ $dbh->do( >+ q{INSERT INTO user_permissions (borrowernumber, module_bit, code) SELECT borrowernumber, module_bit, 'merge_borrowers' FROM user_permissions where module_bit = 4 and code = 'edit_borrowers';} >+ ); >+ >+ say $out "Added 'merge_borrowers' permission to existing users with 'edit_borrowers'"; >+ }, >+}; >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35830
:
186301
|
186302
|
187060
|
188417
|
188723
|
190058