Bug 12703 - OPAC privacy page still accessible when the feature is turned off
authorOwen Leonard <oleonard@myacpl.org>
Tue, 18 Nov 2014 14:52:48 +0000 (09:52 -0500)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Thu, 20 Nov 2014 00:39:09 +0000 (21:39 -0300)
commite47245607342fecdd1719194aa46533d236c42f5
treee7b4c1d2448c532e9c7016fc3d49b38ad5631f35
parentc474b0f645fecb2c1663907904c6b9aa583e4513
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.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
opac/opac-privacy.pl