]> git.koha-community.org Git - koha.git/commit
Bug 18880: Fix authentication fallback for external authentications
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 11 Jul 2017 15:24:36 +0000 (12:24 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Tue, 18 Jul 2017 13:39:42 +0000 (15:39 +0200)
commita2703c15cf82aa61b9f6b55f343a45f368d68a6f
tree17706c6352b628b3b2030788fc3804e8d5bc6a25
parent50431a49849089fd1960accc26b934f29763cd99
Bug 18880: Fix authentication fallback for external authentications

A regression in commit cfc484b17 / bug #18314 breaks the local
authentication fallback for all external authentications like LDAP, CAS
and Shibboleth.

The regression itself is a logical error as "@return = (0)" is
considered to be "false" when checked with "unless" (line 1814). That's
wrong as "unless" tests the number of elements in a list.

This patch tries to simplify the logic by adding a $passwd_ok and
$check_internal_as_fallback flags to be more verbose and hopefully more
understandable.
The goal here is simply to restore back the same logic as before cfc484b17

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit d852b332666da212f1ab8667fa044b16eb151717)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
C4/Auth.pm