Bugzilla – Attachment 89879 Details for
Bug 22724
Staff without writeoff permissions have access to 'Write off selected' button on Pay Fines tab
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22724: Check permissions in the script before displaying template
Bug-22724-Check-permissions-in-the-script-before-d.patch (text/plain), 2.46 KB, created by
Liz Rea
on 2019-05-16 19:33:20 UTC
(
hide
)
Description:
Bug 22724: Check permissions in the script before displaying template
Filename:
MIME Type:
Creator:
Liz Rea
Created:
2019-05-16 19:33:20 UTC
Size:
2.46 KB
patch
obsolete
>From 1c516af4692df0c673d39839b324c07fb496f5f3 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 16 May 2019 10:54:03 +0000 >Subject: [PATCH] Bug 22724: Check permissions in the script before displaying > template > >Signed-off-by: Liz Rea <wizzyrea@gmail.com> >--- > members/paycollect.pl | 17 +++++++++-------- > 1 file changed, 9 insertions(+), 8 deletions(-) > >diff --git a/members/paycollect.pl b/members/paycollect.pl >index cecf2e3fb2..f105c8e398 100755 >--- a/members/paycollect.pl >+++ b/members/paycollect.pl >@@ -36,7 +36,10 @@ use Koha::Token; > > my $input = CGI->new(); > >-my $updatecharges_permissions = $input->param('writeoff_individual') ? 'writeoff' : 'remaining_permissions'; >+my $writeoff_individual = $input->param('writeoff_individual'); >+my $type = scalar $input->param('type') || 'payment'; >+ >+my $updatecharges_permissions = ($writeoff_individual || $type eq 'writeoff') ? 'writeoff' : 'remaining_permissions'; > my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > { template_name => 'members/paycollect.tt', > query => $input, >@@ -62,19 +65,17 @@ my $total_due = $patron->account->outstanding_debits->total_outstanding; > > my $total_paid = $input->param('paid'); > >-my $individual = $input->param('pay_individual'); >-my $writeoff = $input->param('writeoff_individual'); > my $select_lines = $input->param('selected'); >+my $pay_individual = $input->param('pay_individual'); > my $select = $input->param('selected_accts'); > my $payment_note = uri_unescape scalar $input->param('payment_note'); > my $payment_type = scalar $input->param('payment_type'); >-my $type = scalar $input->param('type') || 'payment', > my $accountlines_id; > >-if ( $individual || $writeoff ) { >- if ($individual) { >+if ( $pay_individual || $writeoff_individual ) { >+ if ($pay_individual) { > $template->param( pay_individual => 1 ); >- } elsif ($writeoff) { >+ } elsif ($writeoff_individual) { > $template->param( writeoff_individual => 1 ); > } > my $accounttype = $input->param('accounttype'); >@@ -117,7 +118,7 @@ if ( $total_paid and $total_paid ne '0.00' ) { > token => scalar $input->param('csrf_token'), > }); > >- if ($individual) { >+ if ($pay_individual) { > my $line = Koha::Account::Lines->find($accountlines_id); > Koha::Account->new( { patron_id => $borrowernumber } )->pay( > { >-- >2.11.0
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 22724
:
89457
|
89475
|
89482
|
89485
|
89602
|
89603
|
89604
|
89826
|
89827
|
89878
| 89879 |
90153