From dca437d2b1003fc27088403140dab9ab53de811f Mon Sep 17 00:00:00 2001 From: Mason James Date: Sun, 26 Aug 2012 14:49:39 +1200 Subject: [PATCH] disable login to Koha, via the $database account Content-Type: text/plain; charset="utf-8" http://koha-community.org http://bugs.koha-community.org/show_bug.cgi?id=8689 --- C4/Auth.pm | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index f9b15ef..b205e2a 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -907,13 +907,17 @@ sub checkauth { my $insecure = C4::Context->boolean_preference('insecure'); # finished authentification, now respond - if ( $loggedin || $authnotrequired || ( defined($insecure) && $insecure ) ) - { - # successful login + + # if access is via Koha's $database account - then disable login + unless ( C4::Context->userenv->{'number'} == 0 ) { + + if ( $loggedin || $authnotrequired || ( defined($insecure) && $insecure ) ) { + # successful login unless ($cookie) { $cookie = $query->cookie( CGISESSID => '' ); } return ( $userid, $cookie, $sessionID, $flags ); + } } # -- 1.7.2.5