Bugzilla – Attachment 64874 Details for
Bug 18906
Superlibrarian and budget_manage_all users should always see all funds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18906: Display all funds the logged in user can use
Bug-18906-Display-all-funds-the-logged-in-user-can.patch (text/plain), 1.27 KB, created by
Jonathan Druart
on 2017-07-06 21:11:48 UTC
(
hide
)
Description:
Bug 18906: Display all funds the logged in user can use
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-07-06 21:11:48 UTC
Size:
1.27 KB
patch
obsolete
>From 69bbbf51ed47baaed730b75199d6d29b43ab4b2b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 6 Jul 2017 18:10:10 -0300 >Subject: [PATCH] Bug 18906: Display all funds the logged in user can use > >There are complex conditions to know if a librarian can use a fund, we >cannot do that with a SQL query, we need to use C4::Budgets::CanUserUseBudget >--- > admin/aqbudgets.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/admin/aqbudgets.pl b/admin/aqbudgets.pl >index 97664df13b..cf2c749e40 100755 >--- a/admin/aqbudgets.pl >+++ b/admin/aqbudgets.pl >@@ -237,7 +237,7 @@ if ( $op eq 'list' ) { > ); > > my @budgets = @{ >- GetBudgetHierarchy( $$period{budget_period_id}, C4::Context->userenv->{branch}, ( $show_mine ? $borrower_id : 0 )) >+ GetBudgetHierarchy( $$period{budget_period_id}, undef, ( $show_mine ? $borrower_id : 0 )) > }; > > my $period_total = 0; >@@ -248,6 +248,7 @@ if ( $op eq 'list' ) { > my @budgets_to_display; > foreach my $budget (@budgets) { > # PERMISSIONS >+ next unless CanUserUseBudget($borrowernumber, $budget, $staffflags); > unless(CanUserModifyBudget($borrowernumber, $budget, $staffflags)) { > $budget->{'budget_lock'} = 1; > } >-- >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 18906
:
64874
|
65288
|
65361