Bug 34910: Do not allow checkout for anonymous patron

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 <kelly@bywatersolutions.com>
Signed-off-by: Johanna Miettunen <johanna.miettunen@haaga-helia.fi>
Signed-off-by: Päivi Knuutinen <paivi.knuutinen@joensuu.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit aca49ca14b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9a64d2c93a)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This commit is contained in:
Fridolin Somers 2023-09-25 21:53:45 -10:00 committed by Matt Blenkinsop
parent 61ef38fe55
commit d91b4f6eac
2 changed files with 8 additions and 0 deletions

View file

@ -485,6 +485,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??

View file

@ -94,6 +94,10 @@
<div class="dialog alert">Staff members are not allowed to discharge borrowers, nor borrowers to request a discharge.</div>
[% END %]
[% IF is_anonymous %]
<div class="dialog alert">This is the anonymous patron, so circulation is disabled.</div>
[% END %]
[% IF ( NEEDSCONFIRMATION ) %]
<div id="circ_needsconfirmation" class="dialog alert audio-alert-action focus" tabindex="-1">
[% IF CAN_user_circulate_force_checkout or ADDITIONAL_MATERIALS %]