Bug 12046

Summary: Authentication using CAS - bootstrap
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: OPACAssignee: Fridolin Somers <fridolin.somers>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: fridolin.somers, gmcharlt, mtj
Version: master   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20266
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 17993    
Attachments: Bug 12046: Authentication using CAS - bootstrap
[SIGNED OFF] Bug 12046: Authentication using CAS - bootstrap
[PASSED QA] Bug 12046: Authentication using CAS - bootstrap
Bug 12046: Authentication using CAS - bootstrap
Bug 12046: Authentication using CAS - bootstrap
[PASSED QA] Bug 12046: Authentication using CAS - bootstrap

Description Jonathan Druart 2014-04-08 14:48:22 UTC
At the OPAC, if the bootstrap theme is used, the modal dialog does not allow to use the CAS authentication.
A link should be displayed, as on the opac-user.pl page (and on the prog theme).
Comment 1 Jonathan Druart 2014-04-08 14:51:15 UTC Comment hidden (obsolete)
Comment 2 Mark Tompsett 2014-04-08 21:35:59 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2014-04-09 19:40:05 UTC Comment hidden (obsolete)
Comment 4 Fridolin Somers 2014-04-25 11:51:31 UTC
This patch does not work.
The variable CasServerUrl is always empty.
It's a major problem for CAS users.
Comment 5 Fridolin Somers 2014-04-25 12:23:01 UTC
(In reply to Fridolin SOMERS from comment #4)
> This patch does not work.
I've tested with a real CAS server of one of our client.
It works in opac-user but not in the modal popup (link is empty)
Comment 6 Fridolin Somers 2014-04-25 12:55:43 UTC Comment hidden (obsolete)
Comment 7 Jonathan Druart 2014-04-25 13:56:26 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2014-04-25 13:57:35 UTC
Thanks Fridolin, your patch is much more consistent than mine!
Comment 9 Katrin Fischer 2014-04-26 08:14:54 UTC
Created attachment 27647 [details] [review]
[PASSED QA] Bug 12046: Authentication using CAS - bootstrap

At the OPAC, if the bootstrap theme is used, the modal
dialog does not allow to use the CAS authentication.

This patch proposes, in case CAS is enabled, to
redirect to the opac-user.pl page (like prog theme).
This is because the popup content should stay small
(thinking about mobile surf), and that CAS url is
actually only computed in opac-user (see C4/Auth.pm)
and it would not be performant to compute it in all
pages.

Test plan:
- set syspref opacthemes to bootstrap
- enable the casAuthentication syspref
- fill the casServerUrl syspref with something like:
  https://localhost:8443/cas
- go on the opac home page
- click on "Log in to your account" link (top right)
=> You go to cgi-bin/koha/opac-user.pl page where you
  see the cas link
- disable the casAuthentication syspref
- go on the opac home page
- click on "Log in to your account" link (top right)
=> You see a popup for loggin and password

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Normal login still works with/without CAS.
Passes all tests and QA script.
Comment 10 Galen Charlton 2014-05-05 05:12:46 UTC
Pushed to master.  Thanks, Fridolin!
Comment 11 Fridolin Somers 2014-09-05 14:04:32 UTC
Pushed to 3.14.x, will be in 3.14.11