From aca49ca14b9f2d009f469144f975cd9fbf098181 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Mon, 25 Sep 2023 21:53:45 -1000 Subject: [PATCH] Bug 34910: Do not allow checkout for anonymous patron MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The anonymous patron circulation page should show an alert message and not allow check-out. 1) Configure an existing borrowernumber in system preference AnonymousPatron 2) Go to circulation page of this borrower : /cgi-bin/koha/circ/circulation.pl?borrowernumber=x 3) Check you see alert 'This is the anonymous patron, so circulation is disabled.' Signed-off-by: Kelly McElligott Signed-off-by: Johanna Miettunen Signed-off-by: Päivi Knuutinen Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- circ/circulation.pl | 4 ++++ koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/circ/circulation.pl b/circ/circulation.pl index 372c5596a9..d68eb1ce5f 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -486,6 +486,10 @@ if ( $patron ) { $template->param( is_debarred=> 1 ); $noissues = 1; } + if ( $patron->borrowernumber eq C4::Context->preference("AnonymousPatron") ) { + $template->param( is_anonymous => 1 ); + $noissues = 1; + } my $account = $patron->account; if( ( my $owing = $account->non_issues_charges ) > 0 ) { my $noissuescharge = C4::Context->preference("noissuescharge") || 5; # FIXME If noissuescharge == 0 then 5, why?? diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index c472d66ac4..54cc80c85b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -96,6 +96,10 @@
Staff members are not allowed to discharge borrowers, nor borrowers to request a discharge.
[% END %] + [% IF is_anonymous %] +
This is the anonymous patron, so circulation is disabled.
+ [% END %] + [% IF ( NEEDSCONFIRMATION ) %]
[% IF CAN_user_circulate_force_checkout or ADDITIONAL_MATERIALS %] -- 2.39.5