Bugzilla – Attachment 129514 Details for
Bug 29889
Incorrect library check in patron message deletion logic
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29889: Incorrect library check in patron message deletion logic
Bug-29889-Incorrect-library-check-in-patron-messag.patch (text/plain), 2.28 KB, created by
Owen Leonard
on 2022-01-14 19:48:09 UTC
(
hide
)
Description:
Bug 29889: Incorrect library check in patron message deletion logic
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2022-01-14 19:48:09 UTC
Size:
2.28 KB
patch
obsolete
>From 95897d21fbced957e6638bbfe4ec9c164573c346 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 14 Jan 2022 19:39:02 +0000 >Subject: [PATCH] Bug 29889: Incorrect library check in patron message deletion > logic > >This patch corrects the logic controlling whether a patron message on >the circulation or patron details page has a "Delete" link. An error in >the logic prevented messages from being removed by staff who should have >been authorized to do so. > >To reproduce the bug, check that your AllowAllMessageDeletion preference >is disabled. > >- In the staff client, check out to a patron whose home library doesn't > match the library you're logged in at. >- Add a message to the patron's account. >- You should see no "Delete" link next to the newly-added message. > - If you edit the patron so that their home library matches the > library you're logged in at the delete link will appear. > >To test, apply the patch and follow the steps above. The delete link >should aways appear if the message was left by someone logged in at the >same library. >--- > koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >index 72e747bd14..0c1d8f88dc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >@@ -217,7 +217,7 @@ > [% END %] > <em>"[% patron_message.message | html %]"</em> > </span> >- [% IF patron_message.branchcode == patron.branchcode OR Koha.Preference('AllowAllMessageDeletion') %] >+ [% IF patron_message.branchcode == Branches.GetLoggedInBranchcode OR Koha.Preference('AllowAllMessageDeletion') %] > <a class="btn btn-link" href="/cgi-bin/koha/circ/del_message.pl?message_id=[% patron_message.message_id | html %]&borrowernumber=[% patron_message.borrowernumber | html %]&from=moremember" onclick='return confirm(_("Are you sure you want to delete this message? This cannot be undone."));'><i class="fa fa-trash"></i> Delete</a> > [% END %] > </li> >-- >2.20.1
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 29889
:
129514
|
129592