Bug 18505 - OPAC Search History page does not respect OpacPublic syspref
Summary: OPAC Search History page does not respect OpacPublic syspref
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-28 07:40 UTC by Martin Renvoize
Modified: 2017-12-07 22:20 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
BUG 18505: opac-search-history does not respect opacPublic (1.20 KB, patch)
2017-04-28 07:58 UTC, Martin Renvoize
Details | Diff | Splinter Review
[SIGNED OFF]] BUG 18505: opac-search-history does not respect opacPublic (1.27 KB, patch)
2017-05-01 13:44 UTC, Katrin Fischer
Details | Diff | Splinter Review
[SIGNED OFF] BUG 18505: opac-search-history does not respect opacPublic (1.27 KB, patch)
2017-05-01 15:24 UTC, Katrin Fischer
Details | Diff | Splinter Review
[SIGNED OFF] BUG 18505: opac-search-history does not respect opacPublic (1.27 KB, patch)
2017-05-01 16:03 UTC, Martin Renvoize
Details | Diff | Splinter Review
BUG 18505: opac-search-history does not respect opacPublic (1.33 KB, patch)
2017-05-02 10:02 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2017-04-28 07:40:00 UTC
The opac-search-history script is missing the standard `authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ),` line and therefore does not repsect the OpacPublic preference.
Comment 1 Martin Renvoize 2017-04-28 07:58:29 UTC
Created attachment 62809 [details] [review]
BUG 18505: opac-search-history does not respect opacPublic

The opac-search-history page was available regardless of the opacPublic setting, this
patch corrects that.

Test plan, set opacPublic to 'No', test whether opac-search-history page is available
when not logged in, note that it is.
Apply patch, test whether opac-search-history is still available when not logged in,
note that you should be redirected to the login page.
Comment 2 Katrin Fischer 2017-05-01 13:40:05 UTC
Good catch!
Comment 3 Katrin Fischer 2017-05-01 13:44:24 UTC
Created attachment 62919 [details] [review]
[SIGNED OFF]] BUG 18505: opac-search-history does not respect opacPublic

The opac-search-history page was available regardless of the opacPublic setting, this
patch corrects that.

Test plan, set opacPublic to 'No', test whether opac-search-history page is available
when not logged in, note that it is.
Apply patch, test whether opac-search-history is still available when not logged in,
note that you should be redirected to the login page.

Signed-off-by: Katrin Fischer  <katrin.fischer@web.de>
Comment 4 Katrin Fischer 2017-05-01 15:24:23 UTC
Created attachment 62923 [details] [review]
[SIGNED OFF] BUG 18505: opac-search-history does not respect opacPublic

The opac-search-history page was available regardless of the opacPublic setting, this
patch corrects that.

Test plan, set opacPublic to 'No', test whether opac-search-history page is available
when not logged in, note that it is.
Apply patch, test whether opac-search-history is still available when not logged in,
note that you should be redirected to the login page.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Katrin Fischer 2017-05-01 15:25:09 UTC
Fixed my sign-off line. 
Martin, do you want to fix authorship too? 
From: PTFS Admin <hosting@ptfs-europe.com>
Comment 6 Martin Renvoize 2017-05-01 16:01:55 UTC
Oh, good catch on the Authorship line.. I must have done the original work on a different server to normal.
Comment 7 Martin Renvoize 2017-05-01 16:03:21 UTC
Created attachment 62925 [details] [review]
[SIGNED OFF] BUG 18505: opac-search-history does not respect opacPublic

The opac-search-history page was available regardless of the opacPublic setting, this
patch corrects that.

Test plan, set opacPublic to 'No', test whether opac-search-history page is available
when not logged in, note that it is.
Apply patch, test whether opac-search-history is still available when not logged in,
note that you should be redirected to the login page.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Katrin Fischer 2017-05-01 16:13:20 UTC
Only noticed because of my own mistake (typo in my git alias) :)
Comment 9 Nick Clemens 2017-05-02 10:02:59 UTC
Created attachment 62945 [details] [review]
BUG 18505: opac-search-history does not respect opacPublic

The opac-search-history page was available regardless of the opacPublic setting, this
patch corrects that.

Test plan, set opacPublic to 'No', test whether opac-search-history page is available
when not logged in, note that it is.
Apply patch, test whether opac-search-history is still available when not logged in,
note that you should be redirected to the login page.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 10 Kyle M Hall 2017-05-08 14:17:20 UTC
Pushed to master for 17.05, thanks Martin!
Comment 11 Katrin Fischer 2017-05-14 09:28:19 UTC
This patch has been pushed to 16.11.x and will be in 16.11.08.
Comment 12 Julian Maurice 2017-05-22 10:21:48 UTC
Pushed to 3.22.x for 3.22.21
Comment 13 Mason James 2017-05-24 02:30:27 UTC
Pushed to 16.05.x, for 16.05.13 release