Bugzilla – Attachment 183844 Details for
Bug 32682
Add permission for viewing patron reading history
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32682: Add permission for viewing patron reading history
Bug-32682-Add-permission-for-viewing-patron-readin.patch (text/plain), 2.81 KB, created by
David Flater
on 2025-07-07 15:46:07 UTC
(
hide
)
Description:
Bug 32682: Add permission for viewing patron reading history
Filename:
MIME Type:
Creator:
David Flater
Created:
2025-07-07 15:46:07 UTC
Size:
2.81 KB
patch
obsolete
>From 7eb93f51cedde5303120f00287afe3c07f1fc986 Mon Sep 17 00:00:00 2001 >From: David Flater <flaterdavid@gmail.com> >Date: Mon, 7 Jul 2025 15:10:02 +0000 >Subject: [PATCH] Bug 32682: Add permission for viewing patron reading history > >--- > .../atomicupdate/bug_32682_add_permission.pl | 35 +++++++++++++++++++ > .../data/mysql/mandatory/userpermissions.sql | 1 + > 2 files changed, 36 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_32682_add_permission.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_32682_add_permission.pl b/installer/data/mysql/atomicupdate/bug_32682_add_permission.pl >new file mode 100644 >index 0000000000..33b80ac3a0 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_32682_add_permission.pl >@@ -0,0 +1,35 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_success say_info); >+ >+return { >+ bug_number => "32682", >+ description => "Add permission for viewing patron reading history", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ $dbh->do( >+ q{ >+ INSERT IGNORE permissions (module_bit, code, description) VALUES >+ (4, 'view_checkout_history', 'Viewing checkout history') >+ } >+ ); >+ >+ # permissions >+ say $out "Added new permission 'view_checkout_history'"; >+ >+ # $dbh->do( >+ # q{ >+ # INSERT IGNORE INTO user_permissions (borrowernumber, module_bit, code) >+ # SELECT borrowernumber, 10, 'view_checkout_history' FROM user_permissions WHERE code = 'remaining_permissions' >+ # } >+ # ); >+ >+ # TODO: migrate libraries' "intranetreadinghistory" syspref (will this require us to not fully remove it until we're sure everyone has migrated off of it?) >+ >+ # Other information >+ say_success( $out, "Use green for success" ); >+ say_warning( $out, "Use yellow for warning/a call to action" ); >+ say_info( $out, "Use blue for further information" ); >+ }, >+}; >diff --git a/installer/data/mysql/mandatory/userpermissions.sql b/installer/data/mysql/mandatory/userpermissions.sql >index d5121c91fd..6792cfaeea 100644 >--- a/installer/data/mysql/mandatory/userpermissions.sql >+++ b/installer/data/mysql/mandatory/userpermissions.sql >@@ -49,6 +49,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, 'view_checkout_history', 'Viewing checkout history'), > ( 6, 'place_holds', 'Place holds for patrons'), > ( 6, 'modify_holds_priority', 'Modify holds priority'), > ( 9, 'edit_catalogue', 'Edit catalog (Modify bibliographic/holdings data)'), >-- >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 32682
: 183844 |
183845
|
183846