Bugzilla – Attachment 68694 Details for
Bug 18118
Unexpected behaviour with 'GoogleOpenIDConnect' and 'OpacPublic' syspref combination
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18118 - Unexpected behaviour with 'GoogleOpenIDConnect' and 'OpacPublic' syspref combination.
Bug-18118---Unexpected-behaviour-with-GoogleOpenID.patch (text/plain), 2.31 KB, created by
Kyle M Hall (khall)
on 2017-10-27 13:15:50 UTC
(
hide
)
Description:
Bug 18118 - Unexpected behaviour with 'GoogleOpenIDConnect' and 'OpacPublic' syspref combination.
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2017-10-27 13:15:50 UTC
Size:
2.31 KB
patch
obsolete
>From d36e2c7706cb0d77808b299047b24a7b688f2b29 Mon Sep 17 00:00:00 2001 >From: Mason James <mtj@kohaaloha.com> >Date: Thu, 1 Dec 2016 13:38:51 +1300 >Subject: [PATCH] Bug 18118 - Unexpected behaviour with 'GoogleOpenIDConnect' > and 'OpacPublic' syspref combination. > >TEST PLAN >---------- >1/ configure a working 'GoogleOpenIDConnect' account > >See comment #5 which also links back to >https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16892#c3 > >2/ set 'OpacPublic' (under OPAC) to 'Disabled' and > 'GoogleOpenIDConnect' (under Administration) to 'Yes'. > >3/ log in user successfully via google-auth, observe redirect to > opac-user.pl (bad) > >4/ apply patch > -- on kohadevbox remember to restart all! Plack is unforgiving. :) > >5/ log in user successfully via google-auth, observe expected > redirect to opac-main.pl (good) > >While I would normally suggest running koha qa test tools, because >this file doesn't end in .pl, it doesn't get picked up by them. > >6/ perlcritic -4 opac/svc/auth/googleopenidconnect > -- notice this is a level better than required. :) > >This also eyeballs easily well. > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > opac/svc/auth/googleopenidconnect | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > >diff --git a/opac/svc/auth/googleopenidconnect b/opac/svc/auth/googleopenidconnect >index d417d7a..e3d7df4 100755 >--- a/opac/svc/auth/googleopenidconnect >+++ b/opac/svc/auth/googleopenidconnect >@@ -216,8 +216,16 @@ elsif ( defined $query->param('code') ) { > my ( $userid, $cookie, $session_id ) = > checkauth( $query, 1, {}, 'opac', $email ); > if ($userid) { # A user with this email is registered in koha >+ >+ #handle redirect to main.pl, for private opac >+ my $uri; >+ if (C4::Context->preference('OpacPublic') ) { >+ $uri = '/cgi-bin/koha/opac-user.pl'; >+ } else { >+ $uri = '/cgi-bin/koha/opac-main.pl'; >+ } > print $query->redirect( >- -uri => '/cgi-bin/koha/opac-user.pl', >+ -uri => $uri, > -cookie => $cookie > ); > } >-- >2.10.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18118
:
60236
|
68237
| 68694