Bugzilla – Attachment 17024 Details for
Bug 9953
When OpacMaintenance breaks lifting debarment
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
0001-Bug-9953-When-OpacMaintenance-brakes-lifting-debarme.patch (text/plain), 4.86 KB, created by
Fridolin Somers
on 2013-03-29 12:17:36 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2013-03-29 12:17:36 UTC
Size:
4.86 KB
patch
obsolete
>From 7911b7b4efa7dae58c7127915c626ebf9ccf8036 Mon Sep 17 00:00:00 2001 >From: Fridolyn SOMERS <fridolyn.somers@biblibre.com> >Date: Fri, 29 Mar 2013 13:08:05 +0100 >Subject: [PATCH] Bug 9953 - When OpacMaintenance brakes lifting debarment > >When OpacMaintenance is on, any opac page will redirect to maintenance.pl. >Some pages of intranet have the same behavior and you get 404 error. >This is because in checkauth, if type arg is undefined it is "opac" by default. > >This patch adds type arg in all intranet calls of checkauth. > >Test plan : >- Set syspref OpacMaintenance=Show >- Go to a borrower page >- Click on "Fines" and "Create manual invoice" >- Enter an amount and save >=> Check you go to members/boraccount.pl and not maintenance.pl with 404 error >- Click on "Fines" and "Create manual credit" >- Enter an amount and save >=> Check you go to members/boraccount.pl and not maintenance.pl with 404 error >- Edit borrower >- Set "Restricted" to yes and save >- Click on "Lift restriction" in messages >=> Check you keep in member page and not maintenance.pl with 404 error >- Edit borrower >- Set "Expiry date" to a day in the past and save >- Click on "Renew" in messages >=> Check you keep in member page and not maintenance.pl with 404 error >--- > members/mancredit.pl | 5 +++-- > members/maninvoice.pl | 5 +++-- > members/member-password.pl | 2 +- > members/setdebar.pl | 5 +---- > members/setstatus.pl | 4 +--- > 5 files changed, 9 insertions(+), 12 deletions(-) > >diff --git a/members/mancredit.pl b/members/mancredit.pl >index 88200d0..0cec6b3 100755 >--- a/members/mancredit.pl >+++ b/members/mancredit.pl >@@ -36,6 +36,7 @@ use C4::Items; > use C4::Members::Attributes qw(GetBorrowerAttributes); > > my $input=new CGI; >+my $flagsrequired = { borrowers => 1, updatecharges => 1 }; > > my $borrowernumber=$input->param('borrowernumber'); > >@@ -44,7 +45,7 @@ my $data=GetMember('borrowernumber' => $borrowernumber); > my $add=$input->param('add'); > > if ($add){ >- if(checkauth($input)) { >+ if ( checkauth( $input, 0, $flagsrequired, 'intranet' ) ) { > my $barcode = $input->param('barcode'); > my $itemnum; > if ($barcode) { >@@ -64,7 +65,7 @@ if ($add){ > query => $input, > type => "intranet", > authnotrequired => 0, >- flagsrequired => {borrowers => 1, updatecharges => 1}, >+ flagsrequired => $flagsrequired, > debug => 1, > }); > >diff --git a/members/maninvoice.pl b/members/maninvoice.pl >index f1c572c..5bd756a 100755 >--- a/members/maninvoice.pl >+++ b/members/maninvoice.pl >@@ -35,6 +35,7 @@ use C4::Branch; > use C4::Members::Attributes qw(GetBorrowerAttributes); > > my $input=new CGI; >+my $flagsrequired = { borrowers => 1 }; > > my $borrowernumber=$input->param('borrowernumber'); > >@@ -43,7 +44,7 @@ my $borrowernumber=$input->param('borrowernumber'); > my $data=GetMember('borrowernumber'=>$borrowernumber); > my $add=$input->param('add'); > if ($add){ >- if(checkauth($input)) { >+ if ( checkauth( $input, 0, $flagsrequired, 'intranet' ) ) { > # print $input->header; > my $barcode=$input->param('barcode'); > my $itemnum; >@@ -61,7 +62,7 @@ if ($add){ > query => $input, > type => "intranet", > authnotrequired => 0, >- flagsrequired => { borrowers => 1 }, >+ flagsrequired => $flagsrequired, > debug => 1, > } > ); >diff --git a/members/member-password.pl b/members/member-password.pl >index fe24df3..ebba80a 100755 >--- a/members/member-password.pl >+++ b/members/member-password.pl >@@ -35,7 +35,7 @@ my ($template, $loggedinuser, $cookie, $staffflags) > my $flagsrequired; > $flagsrequired->{borrowers}=1; > >-#my ($loggedinuser, $cookie, $sessionID) = checkauth($input, 0, $flagsrequired); >+#my ($loggedinuser, $cookie, $sessionID) = checkauth($input, 0, $flagsrequired, 'intranet'); > > my $member=$input->param('member'); > my $cardnumber = $input->param('cardnumber'); >diff --git a/members/setdebar.pl b/members/setdebar.pl >index bc0bafb..280ffaa 100755 >--- a/members/setdebar.pl >+++ b/members/setdebar.pl >@@ -36,10 +36,7 @@ use C4::Auth; > > my $input = new CGI; > >-my $flagsrequired; >-$flagsrequired->{borrowers} = 1; >-my ( $loggedinuser, $cookie, $sessionID ) = >- checkauth( $input, 0, $flagsrequired ); >+checkauth( $input, 0, { borrowers => 1 }, 'intranet' ); > > my $borrowernumber = $input->param('borrowernumber'); > >diff --git a/members/setstatus.pl b/members/setstatus.pl >index 914c36e..a6a35aa 100755 >--- a/members/setstatus.pl >+++ b/members/setstatus.pl >@@ -34,9 +34,7 @@ use C4::Auth; > > my $input = new CGI; > >-my $flagsrequired; >-$flagsrequired->{borrowers}=1; >-checkauth($input, 0, $flagsrequired); >+checkauth($input, 0, { borrowers => 1 }, 'intranet'); > > my $destination = $input->param("destination") || ''; > my $cardnumber = $input->param("cardnumber"); >-- >1.7.10.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 9953
:
17024
|
17040
|
17043
|
17044