Bugzilla – Attachment 63212 Details for
Bug 18549
There should be a warning that logging out of Koha will leave browser session logged in to OAuth
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18549: Provide logout modal dialogue
Bug-18549-Provide-logout-modal-dialogue.patch (text/plain), 5.13 KB, created by
Nick Clemens (kidclamp)
on 2017-05-05 20:30:23 UTC
(
hide
)
Description:
Bug 18549: Provide logout modal dialogue
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-05-05 20:30:23 UTC
Size:
5.13 KB
patch
obsolete
>From 0e5d823cf15dd32c2f5e1cbe3a255b52006267fb Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Fri, 5 May 2017 14:57:48 -0400 >Subject: [PATCH] Bug 18549: Provide logout modal dialogue > >I'm sure someone else could make the bootstrap and javascript >prettier. However, this functions. > >TEST PLAN >--------- >1) log in with Google OAuth and log out > -- notice if you click login again, you continue as if you never logged out. > This is because the current log out is a Koha only logout. >2) apply patch >3) log in with Google OAuth and log out >4) click 'Koha only' >5) log in with Google OAuth > -- same continuation as before. >6) log out, but click 'Koha and Google' >7) log in with Google OAuth > -- authentication is required again >8) koha qa test tools > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > .../opac-tmpl/bootstrap/en/includes/masthead.inc | 27 ++++++++++++++++++++-- > koha-tmpl/opac-tmpl/bootstrap/js/script.js | 6 ++++- > 2 files changed, 30 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >index fbb7d51..c8ecf3c 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >@@ -92,7 +92,7 @@ > [%# CAS authentication is too complicated for modal window %] > <li><a href="/cgi-bin/koha/opac-user.pl">Log in to your account</a></li> > [% ELSIF ( Koha.Preference('GoogleOpenIDConnect') == 1 ) %] >- <li><a href="/cgi-bin/koha/svc/auth/googleopenidconnect" role="button" data-toggle="modal">Log in to your account</a></li> >+ <li><a href="/cgi-bin/koha/svc/auth/googleopenidconnect" role="button">Log in to your account</a></li> > [% ELSE %] > <li><a href="/cgi-bin/koha/opac-user.pl" class="loginModal-trigger" role="button" data-toggle="modal">Log in to your account</a></li> > [% END %] >@@ -109,8 +109,12 @@ > [% IF Koha.Preference( 'opacuserlogin' ) == 1 %] > [% IF ( loggedinusername ) %] > <li><p class="navbar-text"> >+ [% IF Koha.Preference('GoogleOpenIDConnect') == 1 %] >+ <a class="logout logoutOAuthModal-trigger" id="logout" href="/cgi-bin/koha/opac-main.pl?logout.x=1"> >+ [% ELSE %] > <a class="logout" id="logout" href="/cgi-bin/koha/opac-main.pl?logout.x=1"> >- Log out</a></p></li> >+ [% END %] >+ Log out</a></p></li> > [% END %] > [% END %] > </ul> >@@ -337,3 +341,22 @@ > </div> > </form> <!-- /#auth --> > </div> <!-- /#modalAuth --> >+ >+ <!-- Google OAuth Logout form hidden by default, used for modal window --> >+ <div id="logoutOAuthModal" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="modalLogoutLabel" aria-hidden="true"> >+ <div class="modal-header"> >+ <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">Ã</button> >+ <h3 id="modalLogoutLabel">Log out from your account</h3> >+ </div> >+ <div class="modal-body"> >+ <p>There are two ways to log out. If you have other Google tabs or >+ windows open, logging out of Koha and Google may affect them. >+ In this case, choose the Koha only log out option. If you only >+ have this OPAC open, then choosing Koha and Google is the more >+ secure choice.<p> >+ <a class="btn btn-primary" href="/cgi-bin/koha/opac-main.pl?logout.x=1">Koha only</a> >+ <a class="btn btn-primary" >+href="https://www.google.com/accounts/Logout?continue=https://appengine.google.com/_ah/logout?continue=[% Koha.Preference('OPACBaseURL') %]/cgi-bin/koha/opac-main.pl?logout.x=1" >+ >Koha and Google</a> >+ </div> >+ </div> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/script.js b/koha-tmpl/opac-tmpl/bootstrap/js/script.js >index de8401b..d9a5b7e 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/script.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/script.js >@@ -58,9 +58,13 @@ $(document).ready(function(){ > $("#loginModal").modal("show"); > $("#members").removeAttr("style"); > }); >+ $(".logoutOAuthModal-trigger").on("click",function(e){ >+ e.preventDefault(); >+ $("#logoutOAuthModal").modal("show"); >+ }); > $("#loginModal").on("hide",function(){ > if($("#user-menu-trigger").is(":hidden")){ > $("#members").removeAttr("style"); > } > }); >-}); >\ No newline at end of file >+}); >-- >2.1.4
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 18549
:
63198
| 63212