Bug 12703 - OPAC privacy page still accessible when the feature is turned off
Summary: OPAC privacy page still accessible when the feature is turned off
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Owen Leonard
QA Contact: Testopia
URL: /cgi-bin/koha/opac-privacy.pl
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-02 22:02 UTC by Katrin Fischer
Modified: 2015-06-04 23:32 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 12703 - OPAC privacy page still accessible when the feature is turned off (2.03 KB, patch)
2014-11-18 15:15 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 12703 - OPAC privacy page still accessible when the feature is turned off (2.06 KB, patch)
2014-11-19 17:46 UTC, Mirko Tietgen
Details | Diff | Splinter Review
[PASSED QA] Bug 12703 - OPAC privacy page still accessible when the feature is turned off (2.15 KB, patch)
2014-11-19 20:41 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2014-08-02 22:02:44 UTC
To test:

- Activate the OpacPrivacy feature.
- Verify you can access the page in the patron account.
- Deactivate the pref.
- Verify there is no longer a link to access the page in the patron account.
- Try to access the page directly using .../cgi-bin/koha/opac-privacy.pl
- Verify page is still accessible :(
Comment 1 Owen Leonard 2014-11-18 15:15:27 UTC Comment hidden (obsolete)
Comment 2 Mirko Tietgen 2014-11-19 17:46:43 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2014-11-19 20:41:02 UTC
Created attachment 33700 [details] [review]
[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.
Comment 4 Tomás Cohen Arazi (tcohen) 2014-11-20 00:48:36 UTC
Patch pushed to master.

Thanks Owen!