Bugzilla – Attachment 85789 Details for
Bug 14708
The patron set as the anonymous patron should not be deletable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14708: Enforce restriction in delete_patrons.pl
Bug-14708-Enforce-restriction-in-deletepatronspl.patch (text/plain), 1.17 KB, created by
Kyle M Hall (khall)
on 2019-02-27 17:00:20 UTC
(
hide
)
Description:
Bug 14708: Enforce restriction in delete_patrons.pl
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2019-02-27 17:00:20 UTC
Size:
1.17 KB
patch
obsolete
>From e64510426ce509f53a300673c1adb48a39261352 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 27 Feb 2019 12:00:03 -0500 >Subject: [PATCH] Bug 14708: Enforce restriction in delete_patrons.pl > >--- > misc/cronjobs/delete_patrons.pl | 8 ++++++++ > 1 file changed, 8 insertions(+) > >diff --git a/misc/cronjobs/delete_patrons.pl b/misc/cronjobs/delete_patrons.pl >index cb59465df4..7510e76af3 100755 >--- a/misc/cronjobs/delete_patrons.pl >+++ b/misc/cronjobs/delete_patrons.pl >@@ -60,6 +60,7 @@ unless ($confirm) { > > say scalar(@$members) . " patrons to delete"; > >+my $anonymous_patron = C4::Context->preference("AnonymousPatron"); > my $deleted = 0; > for my $member (@$members) { > print "Trying to delete patron $member->{borrowernumber}... " >@@ -76,6 +77,13 @@ for my $member (@$members) { > next; > } > >+ if ( $anonymous_patron ) { >+ if ( $patron->id eq $anonymous_patron ) { >+ say "Failed to delete patron $borrowernumber: patron is AnonymousPatron"; >+ next; >+ } >+ } >+ > if ( $confirm ) { > my $deleted = eval { $patron->move_to_deleted; }; > if ($@ or not $deleted) { >-- >2.17.2 (Apple Git-113)
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 14708
:
85766
|
85770
|
85783
|
85789
|
103026
|
103027
|
103028
|
103922
|
105024
|
105025
|
105026
|
105027
|
105028
|
105029
|
105184
|
105185
|
105186
|
105187
|
105188
|
105189
|
112830
|
112831
|
112922
|
113121