Bugzilla – Attachment 100979 Details for
Bug 24663
OPACPublic must be tested for all opac scripts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24663: Handle special cases for recovery password and selfreg
Bug-24663-Handle-special-cases-for-recovery-passwo.patch (text/plain), 2.55 KB, created by
Tomás Cohen Arazi (tcohen)
on 2020-03-18 18:23:21 UTC
(
hide
)
Description:
Bug 24663: Handle special cases for recovery password and selfreg
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2020-03-18 18:23:21 UTC
Size:
2.55 KB
patch
obsolete
>From 3565b5f8e630ccd74b3c71efb011bb8495ae7661 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 17 Feb 2020 16:44:37 +0100 >Subject: [PATCH] Bug 24663: Handle special cases for recovery password and > selfreg >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >The password recovery and self-registration features need to be >accessible at the OPAC even if not public. > >Test plan: >Self register a new account, then ask for a new password with OpacPublic >turned off > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> >--- > C4/Auth.pm | 22 ++++++++++++++++++---- > 1 file changed, 18 insertions(+), 4 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 764781bd34..74fcfd928f 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -169,7 +169,9 @@ sub get_template_and_user { > $in->{'query'}, > $in->{'authnotrequired'}, > $in->{'flagsrequired'}, >- $in->{'type'} >+ $in->{'type'}, >+ undef, >+ $in->{template_name}, > ); > } > >@@ -790,9 +792,21 @@ sub checkauth { > my $flagsrequired = shift; > my $type = shift; > my $emailaddress = shift; >+ my $template_name = shift; > $type = 'opac' unless $type; > >- $authnotrequired = 0 unless C4::Context->preference("OpacPublic"); >+ unless ( C4::Context->preference("OpacPublic") ) { >+ my @allowed_scripts_for_private_opac = qw( >+ opac-memberentry.tt >+ opac-registration-email-sent.tt >+ opac-registration-confirmation.tt >+ opac-memberentry-update-submitted.tt >+ opac-password-recovery.tt >+ ); >+ $authnotrequired = 0 unless grep { $_ eq $template_name } >+ @allowed_scripts_for_private_opac; >+ } >+ > my $dbh = C4::Context->dbh; > my $timeout = _timeout_syspref(); > >@@ -1244,8 +1258,8 @@ sub checkauth { > $LibraryNameTitle =~ s/<(?:\/?)(?:br|p)\s*(?:\/?)>/ /sgi; > $LibraryNameTitle =~ s/<(?:[^<>'"]|'(?:[^']*)'|"(?:[^"]*)")*>//sg; > >- my $template_name = ( $type eq 'opac' ) ? 'opac-auth.tt' : 'auth.tt'; >- my $template = C4::Templates::gettemplate( $template_name, $type, $query ); >+ my $auth_template_name = ( $type eq 'opac' ) ? 'opac-auth.tt' : 'auth.tt'; >+ my $template = C4::Templates::gettemplate( $auth_template_name, $type, $query ); > $template->param( > login => 1, > INPUTS => \@inputs, >-- >2.25.1
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 24663
:
99084
|
99085
|
99086
|
99087
|
99112
|
99258
|
99259
|
99260
|
99261
|
99262
|
99859
|
100972
|
100973
|
100974
|
100975
|
100976
|
100977
|
100978
| 100979 |
100980
|
105508
|
105509
|
105510
|
105511
|
105512
|
105513
|
105514
|
105515
|
105516
|
105517
|
105518
|
105519
|
105520
|
105521
|
109793