Bugzilla – Attachment 110636 Details for
Bug 26517
Avoid deleting patrons with permission
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26517: Avoid deleting patrons with permission
Bug-26517-Avoid-deleting-patrons-with-permission.patch (text/plain), 1.46 KB, created by
Fridolin Somers
on 2020-09-24 07:11:08 UTC
(
hide
)
Description:
Bug 26517: Avoid deleting patrons with permission
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2020-09-24 07:11:08 UTC
Size:
1.46 KB
patch
obsolete
>From daaedea25705e162db7113c947e33e7784eea61a Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Wed, 23 Sep 2020 16:50:09 +0200 >Subject: [PATCH] Bug 26517: Avoid deleting patrons with permission > >The patron deletion script misc/cronjobs/delete_patrons.pl uses C4::Member::GetBorrowersToExpunge() to get patrons that may be deleted. >This method filters patrons from a staff category. >I propose to also filter patrons having permission, so a staff member. >Some small libraries do not define a "staff" category and give permissions to regular patrons. > >Test plan : >1) Create a patron on adult type category with expiry date in the past and permission to access staff interface >2) Without patch >3) Run delete script : ./src/misc/cronjobs/delete_patrons.pl -v --expired_before='$(date -I)' >4) You see the patron will be deleted >5) Apply patch >6) Run delete script : ./src/misc/cronjobs/delete_patrons.pl -v --expired_before='$(date -I)' >7) You dont see the patron >--- > C4/Members.pm | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/C4/Members.pm b/C4/Members.pm >index 6c10eeeb2c..7fad943910 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -406,6 +406,7 @@ sub GetBorrowersToExpunge { > $query .= q| LEFT JOIN patron_list_patrons USING (borrowernumber)|; > } > $query .= q| WHERE category_type <> 'S' >+ AND ( borrowers.flags IS NULL OR borrowers.flags = 0 ) > AND tmp.guarantor_id IS NULL > |; > my @query_params; >-- >2.27.0
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 26517
:
110606
|
110636
|
110637
|
110656
|
110657
|
118524
|
118525