When I'm disconnected from the staff interface for inactivity, I noticed that CAS login always go back to homepage while local login sends me to the correct page (for example a borrower page). When I checked the CAS login URL, I see that the service part is composed of the base url followed-up directly by the query part of the page. The script part is absent. Then, I checked C4/Auth_with_cas.pm and see in the sub _url_with_get_params that get_script_name() is only called for the OPAC login. Is there a specific reason for that or can we call get_script_name() for both context ?
I guess it is an oversight, this behaviour exists since bug 13507.
Created attachment 67405 [details] [review] Bug 19373: CAS logout - Redirect to the previous page (Intranet)
I have not tested this patch.
Tested on our 16.11 preproduction version and it works pretty good.
not ok 4 - Intranet URL should be returned when using intranet login (Bug 13507) # Failed test 'Intranet URL should be returned when using intranet login (Bug 13507)' # at t/db_dependent/Auth_with_cas.t line 62. # got: 'localhost:8080/cgi-bin/koha/opac-user.pl?bar=baz' # expected: 'localhost:8080?bar=baz'
Created attachment 67963 [details] [review] Bug 19373: Update tests
Matts, could you take a look at these changes?
I'm ok with this patch, and I successfully tested it on my local instance with BibLibre's CAS Test server. I'm signing it off.
Created attachment 68077 [details] [review] Bug 19373: Update tests Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Created attachment 68078 [details] [review] Bug 19373: CAS logout - Redirect to the previous page (Intranet) Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Created attachment 68171 [details] [review] Bug 19373: Update tests Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 68172 [details] [review] Bug 19373: CAS logout - Redirect to the previous page (Intranet) Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed to master for 17.11, thanks to everybody involved!