From e46bd2ba9c209a69cea2ae54a10d9ef59e9735a7 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 --- 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 99cee0c87b..cf509bfe90 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -472,6 +472,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 3388e387a5..55d9229f8e 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.42.0