Bug 20536 - ILL: authnotrequired not explicitly unset
Summary: ILL: authnotrequired not explicitly unset
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL: http://wiki.koha-community.org/wiki/I...
Whiteboard:
Keywords:
Depends on: 7317
Blocks:
  Show dependency treegraph
 
Reported: 2018-04-06 09:20 UTC by Martin Renvoize
Modified: 2018-05-22 11:05 UTC (History)
36 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 20536 - ILL: authnotrequired not explicitly unset (1.12 KB, patch)
2018-04-06 09:33 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20536 - ILL: authnotrequired should be explicitly unset on opac (917 bytes, patch)
2018-04-09 08:30 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20536 - ILL: authnotrequired should be explicitly unset on opac (917 bytes, patch)
2018-04-09 08:31 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 20536 - ILL: authnotrequired should be explicitly unset on opac (963 bytes, patch)
2018-04-10 03:41 UTC, M. Tompsett
Details | Diff | Splinter Review
Bug 20536: (ILL) authnotrequired should be explicitly unset on opac (1.00 KB, patch)
2018-04-10 09:33 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2018-04-06 09:20:36 UTC
In the ILL intranet controller, the authnotrequired flag is not explicitly unset in get_template_and_user and as such if a user attempts to navigate directly to any of the ILL forms they are faced with an error rather than the standard login redirect.
Comment 1 Martin Renvoize 2018-04-06 09:33:51 UTC
Created attachment 73757 [details] [review]
Bug 20536 - ILL: authnotrequired not explicitly unset

* ill/illrequest.pl - Added explicity setting of authnotrequired
Comment 2 M. Tompsett 2018-04-06 13:28:03 UTC
I enabled IllModule system preference.
Went to Home -> ILL Requests (didn't get forced log in screen, though I got configuration warning note)
Copied URL.
Logged out.
Pasted URL into address bar.
Got forced login screen.

It seems like overkill, given that:

 157 sub get_template_and_user {
 158 
 159     my $in = shift;
 160     my ( $user, $cookie, $sessionID, $flags );
 161 
 162     C4::Context->interface( $in->{type} );
 163 
 164     $in->{'authnotrequired'} ||= 0;
 165 

In C4/Auth.pm it expressly gets set if it isn't passed.
So unless you can provide a set of steps as explicit as this which repeats the problem, I am marking this RESOLVED WORKSFORME.
Comment 3 Martin Renvoize 2018-04-09 08:26:34 UTC
Ack, you're totally right.. it's the OPAC side I meant to patch not the staff client!
Comment 4 Martin Renvoize 2018-04-09 08:30:58 UTC
Created attachment 73846 [details] [review]
Bug 20536 - ILL: authnotrequired should be explicitly unset on opac

* koha/opac-illrequest.pl - Added explicit setting of authnotrequired
Comment 5 Martin Renvoize 2018-04-09 08:31:40 UTC
Created attachment 73847 [details] [review]
Bug 20536 - ILL: authnotrequired should be explicitly unset on opac

* koha/opac-illrequest.pl - Added explicit setting of authnotrequired
Comment 6 M. Tompsett 2018-04-10 03:37:26 UTC
(In reply to Martin Renvoize from comment #0)
> if a user attempts to navigate
> directly to any of the ILL forms they are faced with an error rather than
> the standard login redirect.

Aaaah! That's the problem... okay, got it. Reproduced. YAY!
Comment 7 M. Tompsett 2018-04-10 03:40:20 UTC
When OpacPublic is Enabled, going directly to
 http://kohadev.mydnsname.org/cgi-bin/koha/opac-illrequests.pl
on a kohadevbox doesn't give the log in, but rather attempts to show the page.
It should always require log in for ILL requests.
Comment 8 M. Tompsett 2018-04-10 03:41:27 UTC
Created attachment 73898 [details] [review]
Bug 20536 - ILL: authnotrequired should be explicitly unset on opac

* koha/opac-illrequest.pl - Added explicit setting of authnotrequired

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 9 Tomás Cohen Arazi 2018-04-10 09:33:20 UTC
Created attachment 73917 [details] [review]
Bug 20536: (ILL) authnotrequired should be explicitly unset on opac

* koha/opac-illrequest.pl - Added explicit setting of authnotrequired

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 10 Jonathan Druart 2018-04-11 19:54:48 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 11 Nick Clemens 2018-05-14 21:02:32 UTC
Pushed to stbale for 17.11.06

Awesome work all!
Comment 12 Fridolin SOMERS 2018-05-22 11:05:38 UTC
Depends on Bug 7317 not in 17.05.x