]> git.koha-community.org Git - koha.git/commit
Bug 24663: [19.11.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)
committerAleisha Amohia <aleishaamohia@hotmail.com>
Tue, 25 Aug 2020 03:44:56 +0000 (15:44 +1200)
commitfb7ce18b92a3f0d4d5648f06f65dc8e378797544
tree08d41e4322ca07d322338495de8fb3e405a65ee2
parentc37c0fba96f309f01cebe52b38a483d374b622b4
Bug 24663: [19.11.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: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
C4/Auth.pm