]> git.koha-community.org Git - koha.git/commit
Bug 24663: [19.05.x] Test OpacPublic for all OPAC scripts
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 17 Feb 2020 12:16:48 +0000 (13:16 +0100)
committerVictor Grousset/tuxayo <victor@tuxayo.net>
Mon, 24 Aug 2020 16:04:30 +0000 (18:04 +0200)
commitbf47b719a05c667226e5449ed54c316e10f781a8
treeb49928acb5eb1063a1691b4f4770e47d600d4a58
parent31900b557d1bca3245f239a2856e2a7694a28ecb
Bug 24663: [19.05.x] Test OpacPublic for all OPAC scripts

Prior to this patchset there were 3 different calls to
get_template_and_user (or checkauth) with the authnotrequired param:
 * authnotrequired => 0
 * authnotrequired => 1
 * authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 )

The first one says that an unauthenticated user can access the page, the
second that the user has to be authenticated, and the last one that it
depends on the OpacPublic syspref.
Actually we must replace the first one with the third one, if the OPAC
is not public, the authentication must be forced.

To do so we are going to remove the "authnotrequired => 0" occurrences,
and check the OpacPublic syspref's value in C4::Auth

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
C4/Auth.pm