Bugzilla – Attachment 33700 Details for
Bug 12703
OPAC privacy page still accessible when the feature is turned off
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 12703 - OPAC privacy page still accessible when the feature is turned off
PASSED-QA-Bug-12703---OPAC-privacy-page-still-acce.patch (text/plain), 2.15 KB, created by
Katrin Fischer
on 2014-11-19 20:41:02 UTC
(
hide
)
Description:
[PASSED QA] Bug 12703 - OPAC privacy page still accessible when the feature is turned off
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-11-19 20:41:02 UTC
Size:
2.15 KB
patch
obsolete
>From fd65ce478189aea7325e6cedec6803a59cd33d2d Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 18 Nov 2014 09:52:48 -0500 >Subject: [PATCH] [PASSED QA] Bug 12703 - OPAC privacy page still accessible > when the feature is turned off > >If the OPACPrivacy system preference is turned off it is still possible >to navigate directly to the OPAC privacy page if you know the URL. This >patch adapts the fix for Bug 10595 (OpacTopissue page still >accessible when system preference is turned off) for opac-privacy.pl > >Because the OPACPrivacy preference is irrelevant if opacreadinghistory >is not turned on, the patch adds a check for both to determine whether >the page should be accessible. > >Log in to the OPAC and test under the following conditions: > > - OPACPrivacy is turned off, opacreadinghistory is turned off. Navigate > directly to /cgi-bin/koha/opac-privacy.pl. You should get a 404 > error. > > - OPACPrivacy is turned off, opacreadinghistory is turned on. Navigate > directly to /cgi-bin/koha/opac-privacy.pl. You should get a 404 > error. > > - OPACPrivacy is turned on, opacreadinghistory is turned off. Navigate > directly to /cgi-bin/koha/opac-privacy.pl. You should get a 404 > error. > > - OPACPrivacy is turned on, opacreadinghistory is turned on. A link to > both "your reading history" and "your privacy" should appear in the > left-hand sidebar menu. Both pages should work. > >Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Works as described, passes tests and qa script. >--- > opac/opac-privacy.pl | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/opac/opac-privacy.pl b/opac/opac-privacy.pl >index 7b56e5d..fd98e6c 100755 >--- a/opac/opac-privacy.pl >+++ b/opac/opac-privacy.pl >@@ -27,6 +27,13 @@ use C4::Output; > use C4::Dates; > > my $query = new CGI; >+ >+# if OPACPrivacy is disabled, leave immediately >+if ( ! C4::Context->preference('OPACPrivacy') || ! C4::Context->preference('opacreadinghistory') ) { >+ print $query->redirect("/cgi-bin/koha/errors/404.pl"); >+ exit; >+} >+ > my $dbh = C4::Context->dbh; > > my ( $template, $borrowernumber, $cookie ) = get_template_and_user( >-- >1.9.1
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 12703
:
33655
|
33686
| 33700