[Koha-bugs] [Bug 26517] Avoid deleting patrons with permission

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Mar 19 13:31:50 CET 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26517

Nick Clemens <nick at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #110656|0                           |1
        is obsolete|                            |
 Attachment #110657|0                           |1
        is obsolete|                            |

--- Comment #14 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 118524
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118524&action=edit
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

Signed-off-by: David Nind <david at davidnind.com>

Signed-off-by: Nick Clemens <nick at bywatersolutions.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list