Bug 18505

Summary: OPAC Search History page does not respect OpacPublic syspref
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: julian.maurice, katrin.fischer, kyle, mtj
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: BUG 18505: opac-search-history does not respect opacPublic
[SIGNED OFF]] BUG 18505: opac-search-history does not respect opacPublic
[SIGNED OFF] BUG 18505: opac-search-history does not respect opacPublic
[SIGNED OFF] BUG 18505: opac-search-history does not respect opacPublic
BUG 18505: opac-search-history does not respect opacPublic

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