Bugzilla – Attachment 184572 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), 5.02 KB, created by
David Flater
on 2025-07-23 20:08:01 UTC
(
hide
)
Description:
Bug 32682: Add permission for viewing patron reading history
Filename:
MIME Type:
Creator:
David Flater
Created:
2025-07-23 20:08:01 UTC
Size:
5.02 KB
patch
obsolete
>From 9fffb85fbd0d4aa4f7e0633abe6861b9aabc28fa Mon Sep 17 00:00:00 2001 >From: David Flater <flaterdavid@gmail.com> >Date: Wed, 23 Jul 2025 19:45:32 +0000 >Subject: [PATCH] Bug 32682: Add permission for viewing patron reading history > >Create or modify a staff user with edit_borrowers permssion enabled ( Staff A ) >Create or modify a staff user without edit_borrowers permssion enabled ( Staff B ) >Ensure the "intranetreadinghistory" syspref is enabled >Check out an assortment of items to any patron >Apply patch, update_database, then restart_all >Check the permissions of the staff user A and ensure that they have been automatically assigned the new "view_checkout_history" permission >Check the permissions of the staff user B and ensure that they have NOT been automatically assigned the new "view_checkout_history" permission >View the same patron and ensure you can still see their checkout history as Staff A and as a superlibrarain >Disable the "intranetreadinghistory" syspref and remove the "view_checkout_history" permission of the staff user >update_database, then restart_all, and check the staff user (Staff A and Staff B). Neither should have the "view_checkout_history" permission >L:i >--- > koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc | 2 +- > koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc | 2 +- > .../intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >index 60e05901e3..9600c57722 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >@@ -188,7 +188,7 @@ > </li> > [% END %] > [% END %] >- [% IF CAN_user_borrowers_view_checkout_history %] >+ [% IF (CAN_user_borrowers_view_checkout_history && Koha.Preference('intranetreadinghistory')) %] > <li [% IF readingrecordview %]class="active"[% END %]> > <a href="/cgi-bin/koha/members/readingrec.pl?borrowernumber=[% patron.borrowernumber | uri %]">Circulation history</a> > </li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >index 18c9f348fc..6fa7a927cf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >@@ -151,7 +151,7 @@ > </li> > [% END %] > [% END %] >- [% IF CAN_user_borrowers_view_checkout_history %] >+ [% IF CAN_user_borrowers_view_checkout_history && Koha.Preference('intranetreadinghistory') %] > [% IF ( patron.privacy == 2 ) %] > <li data-bs-toggle="tooltip" data-bs-placement="left" title="Not allowed by patron's privacy settings"> > <a class="dropdown-item disabled" aria-disabled="true" id="exportbarcodes" href="#">Export today's checked in barcodes</a> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt >index 91e021ff02..3660b82e0b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt >@@ -41,7 +41,7 @@ > <h1>Checkout history for [% INCLUDE 'biblio-title.inc' %]</h1> > [% IF biblio.author %]<h3>by [% biblio.author | html %]</h3>[% END %] > >- [% SET show_patron_column = CAN_user_borrowers_view_checkout_history) AND CAN_user_circulate_circulate_remaining_permissions %] >+ [% SET show_patron_column = (CAN_user_borrowers_view_checkout_history && Koha.Preference('intranetreadinghistory')) AND CAN_user_circulate_circulate_remaining_permissions %] > > <div class="searchresults page-section"> > [% IF checkouts %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt >index 3ddd2144e9..409cd5ac5c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt >@@ -46,7 +46,7 @@ > [% UNLESS checkouts %][% checkouts = [] %][% END %] > [% UNLESS old_checkouts %][% old_checkouts = [] %][% END %] > [% SET all_checkouts = checkouts.merge(old_checkouts) %] >- [% UNLESS CAN_user_borrowers_view_checkout_history %] >+ [% UNLESS (CAN_user_borrowers_view_checkout_history && Koha.Preference('intranetreadinghistory')) %] > <div class="alert alert-warning">Staff members are not allowed to access patron's checkout history</div> > [% ELSIF is_anonymous %] > <div class="alert alert-warning">This is the anonymous patron, so no circulation history is displayed. To get a list of anonymized loans, please run a report.</div> >-- >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
|
184571
|
184572
|
184832
|
184833