Bug 20536

Summary: ILL: authnotrequired not explicitly unset
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: CirculationAssignee: Martin Renvoize <martin.renvoize>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: alex, benjamin.rokseth, black23, bob, bouzid.fergani, caroline.cyr-la-rose, dch, eric.begin, francois.charbonnier, frank.hansen, fridolin.somers, gmcharlt, hagud, janet.mcgowan, jonathan.druart, jonathan.field, josef.moravec, katrin.fischer, kyle.m.hall, kyle, lisettepalouse+koha, magnus, manueltamayao, martin.renvoize, mirko, mtompset, niamh.walker-headon, nick, philippe.blouin, pongtawat, sally.healey, sarah, severine.queune, tomascohen, veron
Version: master   
Hardware: All   
OS: All   
URL: http://wiki.koha-community.org/wiki/ILL_Module
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 7317    
Bug Blocks:    
Attachments: Bug 20536 - ILL: authnotrequired not explicitly unset
Bug 20536 - ILL: authnotrequired should be explicitly unset on opac
Bug 20536 - ILL: authnotrequired should be explicitly unset on opac
Bug 20536 - ILL: authnotrequired should be explicitly unset on opac
Bug 20536: (ILL) authnotrequired should be explicitly unset on opac

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 Mark 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 Mark 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 Mark 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 Mark 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