Bugzilla – Attachment 99084 Details for
Bug 24663
OPACPublic must be tested for all opac scripts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24663: Test OpacPublic for all OPAC scripts
Bug-24663-Test-OpacPublic-for-all-OPAC-scripts.patch (text/plain), 1.31 KB, created by
Jonathan Druart
on 2020-02-17 12:38:57 UTC
(
hide
)
Description:
Bug 24663: Test OpacPublic for all OPAC scripts
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-02-17 12:38:57 UTC
Size:
1.31 KB
patch
obsolete
>From 464062ee28320bf876f4bf185f42fa991adb5a90 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 17 Feb 2020 13:16:48 +0100 >Subject: [PATCH] Bug 24663: 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 >--- > C4/Auth.pm | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index c825136af1..bf7d519287 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -793,6 +793,7 @@ sub checkauth { > my $emailaddress = shift; > $type = 'opac' unless $type; > >+ $authnotrequired = 0 unless C4::Context->preference("OpacPublic"); > my $dbh = C4::Context->dbh; > my $timeout = _timeout_syspref(); > >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24663
:
99084
|
99085
|
99086
|
99087
|
99112
|
99258
|
99259
|
99260
|
99261
|
99262
|
99859
|
100972
|
100973
|
100974
|
100975
|
100976
|
100977
|
100978
|
100979
|
100980
|
105508
|
105509
|
105510
|
105511
|
105512
|
105513
|
105514
|
105515
|
105516
|
105517
|
105518
|
105519
|
105520
|
105521
|
109793