Bugzilla – Attachment 15477 Details for
Bug 9587
Allow login via mozilla persona - https://www.mozilla.org/en-US/persona/
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 9587 Follow up to fix the problem Katrin identified
PASSED-QA-Bug-9587-Follow-up-to-fix-the-problem-Ka.patch (text/plain), 5.82 KB, created by
Katrin Fischer
on 2013-02-17 15:24:06 UTC
(
hide
)
Description:
[PASSED QA] Bug 9587 Follow up to fix the problem Katrin identified
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2013-02-17 15:24:06 UTC
Size:
5.82 KB
patch
obsolete
>From 00f6d5d24f65d05b755650e82f41e0e24d1ee695 Mon Sep 17 00:00:00 2001 >From: Chris Cormack <chris@bigballofwax.co.nz> >Date: Sun, 17 Feb 2013 22:44:01 +1300 >Subject: [PATCH] [PASSED QA] Bug 9587 Follow up to fix the problem Katrin > identified > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> > >Comment: Solve that problem, but now koha-qa complains about tabs >in C4/Context.pm. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Tests done: >1) System preference 'Persona' added correctly. >2) Persona off, normal login still possible >3) Persona on, Persona login works >4) Persona logout works >5) normal login still possible >6) normal logout still possible > >Persona is off by default and uses the primary email address >from the patron account. >--- > C4/Auth.pm | 12 ++++++++---- > C4/Context.pm | 8 +++++--- > .../opac-tmpl/prog/en/includes/opac-bottom.inc | 2 +- > 3 files changed, 14 insertions(+), 8 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 6141fc2..efe1200 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -324,6 +324,7 @@ sub get_template_and_user { > LoginFirstname => (C4::Context->userenv?C4::Context->userenv->{"firstname"}:"Bel"), > LoginSurname => C4::Context->userenv?C4::Context->userenv->{"surname"}:"Inconnu", > emailaddress => C4::Context->userenv?C4::Context->userenv->{"emailaddress"}:undef, >+ loggedinpersona => C4::Context->userenv?C4::Context->userenv->{"persona"}:undef, > TagsEnabled => C4::Context->preference("TagsEnabled"), > hide_marc => C4::Context->preference("hide_marc"), > item_level_itypes => C4::Context->preference('item-level_itypes'), >@@ -336,7 +337,6 @@ sub get_template_and_user { > marcflavour => C4::Context->preference("marcflavour"), > persona => C4::Context->preference("persona"), > ); >- > if ( $in->{'type'} eq "intranet" ) { > $template->param( > AmazonCoverImages => C4::Context->preference("AmazonCoverImages"), >@@ -661,7 +661,8 @@ sub checkauth { > $session->param('cardnumber'), $session->param('firstname'), > $session->param('surname'), $session->param('branch'), > $session->param('branchname'), $session->param('flags'), >- $session->param('emailaddress'), $session->param('branchprinter') >+ $session->param('emailaddress'), $session->param('branchprinter'), >+ $session->param('persona') > ); > C4::Context::set_shelves_userenv('bar',$session->param('barshelves')); > C4::Context::set_shelves_userenv('pub',$session->param('pubshelves')); >@@ -780,7 +781,6 @@ sub checkauth { > } > $return = $value ? 1 : 0; > $userid = $value; >- > } > > elsif ( >@@ -926,12 +926,16 @@ sub checkauth { > $session->param('ip',$session->remote_addr()); > $session->param('lasttime',time()); > } >+ if ($persona){ >+ $session->param('persona',1); >+ } > C4::Context::set_userenv( > $session->param('number'), $session->param('id'), > $session->param('cardnumber'), $session->param('firstname'), > $session->param('surname'), $session->param('branch'), > $session->param('branchname'), $session->param('flags'), >- $session->param('emailaddress'), $session->param('branchprinter') >+ $session->param('emailaddress'), $session->param('branchprinter'), >+ $session->param('persona') > ); > > } >diff --git a/C4/Context.pm b/C4/Context.pm >index 4e6c5fb..8451609 100644 >--- a/C4/Context.pm >+++ b/C4/Context.pm >@@ -1057,7 +1057,8 @@ sub userenv { > =head2 set_userenv > > C4::Context->set_userenv($usernum, $userid, $usercnum, $userfirstname, >- $usersurname, $userbranch, $userflags, $emailaddress); >+ $usersurname, $userbranch, $userflags, $emailaddress, $branchprinter, >+ $persona); > > Establish a hash of user environment variables. > >@@ -1067,7 +1068,7 @@ set_userenv is called in Auth.pm > > #' > sub set_userenv { >- my ($usernum, $userid, $usercnum, $userfirstname, $usersurname, $userbranch, $branchname, $userflags, $emailaddress, $branchprinter)= @_; >+ my ($usernum, $userid, $usercnum, $userfirstname, $usersurname, $userbranch, $branchname, $userflags, $emailaddress, $branchprinter, $persona)= @_; > my $var=$context->{"activeuser"} || ''; > my $cell = { > "number" => $usernum, >@@ -1080,7 +1081,8 @@ sub set_userenv { > "branchname" => $branchname, > "flags" => $userflags, > "emailaddress" => $emailaddress, >- "branchprinter" => $branchprinter >+ "branchprinter" => $branchprinter, >+ "persona" => $persona, > }; > $context->{userenv}->{$var} = $cell; > return $cell; >diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc >index 25d74e2..b875028 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc >+++ b/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc >@@ -65,7 +65,7 @@ > <script type="text/javascript" language="javascript"> > > navigator.id.watch({ >- loggedInUser: [% IF emailaddress %]'[% emailaddress %]'[% ELSE %]null[% END %], >+ loggedInUser: [% IF emailaddress && loggedinpersona %]'[% emailaddress %]'[% ELSE %]null[% END %], > onlogin: function (assertion) { > $.post('/cgi-bin/koha/svc/login', > { assertion: assertion }, >-- >1.7.9.5
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 9587
:
15226
|
15254
|
15257
|
15258
|
15265
|
15266
|
15449
|
15459
|
15474
|
15475
|
15476
| 15477 |
15478
|
15578
|
15580
|
15585