Bugzilla – Attachment 188299 Details for
Bug 34069
Add ability to restore a recently deleted borrower from deletedborrowers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34069: Add restore_deleted_borrowers permission
Bug-34069-Add-restoredeletedborrowers-permission.patch (text/plain), 3.84 KB, created by
Lucas Gass (lukeg)
on 2025-10-22 15:19:07 UTC
(
hide
)
Description:
Bug 34069: Add restore_deleted_borrowers permission
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2025-10-22 15:19:07 UTC
Size:
3.84 KB
patch
obsolete
>From fbbb7340adb772aa66f122c6b3cf123cbbb732f6 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 22 Oct 2025 15:18:34 +0000 >Subject: [PATCH] Bug 34069: Add restore_deleted_borrowers permission > >--- > installer/data/mysql/atomicupdate/bug_34069.pl | 17 +++++++++++++++++ > .../data/mysql/mandatory/userpermissions.sql | 1 + > .../prog/en/includes/permissions.inc | 3 +++ > t/Koha/Auth/Permissions.t | 1 + > 4 files changed, 22 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_34069.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_34069.pl b/installer/data/mysql/atomicupdate/bug_34069.pl >new file mode 100755 >index 00000000000..bc95fe9b05a >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_34069.pl >@@ -0,0 +1,17 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_success say_info); >+ >+return { >+ bug_number => "34069", >+ description => "Add new permission restore_deleted_borrowers", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ $dbh->do( >+ q{INSERT IGNORE permissions (module_bit, code, description) VALUES (4, 'restore_deleted_borrowers', 'Restore deleted patrons')} >+ ); >+ >+ say $out "Added new permission 'restore_deleted_borrowers'"; >+ }, >+}; >diff --git a/installer/data/mysql/mandatory/userpermissions.sql b/installer/data/mysql/mandatory/userpermissions.sql >index 509cfd79f38..a18d499774b 100644 >--- a/installer/data/mysql/mandatory/userpermissions.sql >+++ b/installer/data/mysql/mandatory/userpermissions.sql >@@ -51,6 +51,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES > ( 4, 'list_borrowers', 'Search, list and view patrons'), > ( 4, 'send_messages_to_borrowers', 'Send messages to patrons'), > ( 4, 'view_borrower_infos_from_any_libraries', 'View patron infos from any libraries'), >+ ( 4, 'restore_deleted_borrowers', 'Restore deleted patrons'), > ( 6, 'place_holds', 'Place holds for patrons'), > ( 6, 'modify_holds_priority', 'Modify holds priority'), > ( 6, 'alter_hold_targets', 'Move holds between items and records'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >index 8cb47687a64..d7d65e3071f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >@@ -245,6 +245,9 @@ > [%- CASE 'send_messages_to_borrowers' -%] > <span class="sub_permission send_messages_to_borrowers_subpermission"> Send messages to patrons </span> > <span class="permissioncode">([% name | html %])</span> >+ [%- CASE 'restore_deleted_borrowers' -%] >+ <span class="sub_permission restore_deleted_borrowers_subpermission"> Restore deleted patrons </span> >+ <span class="permissioncode">([% name | html %])</span> > [%- CASE 'modify_holds_priority' -%] > <span class="sub_permission modify_holds_priority_subpermission"> Modify holds priority </span> > <span class="permissioncode">([% name | html %])</span> >diff --git a/t/Koha/Auth/Permissions.t b/t/Koha/Auth/Permissions.t >index 5ead5e3a318..b7d6fcdfaf2 100755 >--- a/t/Koha/Auth/Permissions.t >+++ b/t/Koha/Auth/Permissions.t >@@ -130,6 +130,7 @@ subtest 'superlibrarian tests' => sub { > 'CAN_user_borrowers_edit_borrowers' => 1, > 'CAN_user_borrowers_list_borrowers' => 1, > 'CAN_user_borrowers_api_validate_password' => 1, >+ 'CAN_user_borrowers_restore_deleted_borrowers' => 1, > 'CAN_user_borrowers_view_borrower_infos_from_any_libraries' => 1, > 'CAN_user_borrowers' => 1, > 'CAN_user_cash_management_anonymous_refund' => 1, >-- >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 34069
:
188299
|
188302
|
188988
|
188989
|
188990
|
189027
|
189028
|
189029
|
189030
|
189037
|
189066
|
189067
|
189370
|
189371
|
189372
|
189373
|
189374
|
189375
|
189376
|
189377
|
189642
|
189645
|
189718
|
189773
|
189774
|
189779
|
189780
|
189781
|
189782
|
189783
|
189784
|
189785
|
189786
|
189787
|
189788
|
189789
|
189790
|
189791
|
189792
|
189793
|
189794
|
189795
|
189940
|
189941
|
189942
|
189943
|
189944
|
189945
|
189946
|
189947
|
189948
|
189949
|
189950
|
189951
|
189952
|
189953
|
189954