Bugzilla – Attachment 70662 Details for
Bug 17765
Hide 'Holds' link in staff results list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17765: Changed variable $flags to $userflags to eliminate the issue of masking declaration in the same scope. Hides 'Holds' link on the 'Details' and 'Checkout' pages when the user does not have the permission to 'reserveforothers'.
Bug-17765-Changed-variable-flags-to-userflags-to-e.patch (text/plain), 2.22 KB, created by
Zoe Bennett
on 2018-01-18 01:50:10 UTC
(
hide
)
Description:
Bug 17765: Changed variable $flags to $userflags to eliminate the issue of masking declaration in the same scope. Hides 'Holds' link on the 'Details' and 'Checkout' pages when the user does not have the permission to 'reserveforothers'.
Filename:
MIME Type:
Creator:
Zoe Bennett
Created:
2018-01-18 01:50:10 UTC
Size:
2.22 KB
patch
obsolete
>From f15376c623434a7eff9e912de600e12fdbfd2c53 Mon Sep 17 00:00:00 2001 >From: Zoe Bennett <zoebennett1308@gmail.com> >Date: Thu, 18 Jan 2018 01:44:11 +0000 >Subject: [PATCH] Bug 17765: Changed variable $flags to $userflags to eliminate > the issue of masking declaration in the same scope. Hides 'Holds' link on the > 'Details' and 'Checkout' pages when the user does not have the permission to > 'reserveforothers'. > >Test Plan: >1) With a user who has the permission to 'reserveforothers' check that the 'Holds' link is on the 'Details' and 'Check out' pages >2) Then with a user who does not have the permission to 'reserveforothers' check that on the 'Details' and 'Check out' pages there is no longer the 'Holds' link next to the 'Checkouts' and 'Fines & Charges' tabs. >--- > circ/circulation.pl | 8 +++++--- > members/moremember.pl | 4 ++-- > 2 files changed, 7 insertions(+), 5 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 4438dfb..5f61507 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -176,9 +176,11 @@ my $print = $query->param('print') || q{}; > my $debt_confirmed = $query->param('debt_confirmed') || 0; # Don't show the debt error dialog twice > my $charges = $query->param('charges') || q{}; > >-my $flags = C4::Auth::getuserflags($patron->flags, $patron->userid); >-if (ref $flags->{reserveforothers} && $flags->{reserveforothers}){ >- $template->param( has_reserveforothers_permission => 1 )} >+my $userflags = C4::Auth::getuserflags($patron->flags, $patron->userid); >+warn($userflags->{reserveforothers}); >+if ($userflags->{reserveforothers}){ >+ $template->param( has_reserveforothers_permission => 1 ); >+} > > # Check if stickyduedate is turned off > if ( @$barcodes ) { >diff --git a/members/moremember.pl b/members/moremember.pl >index 56db5dd..e32cdde 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -167,8 +167,8 @@ if ( $patron->is_debarred ) { > } > } > >-my $flags = C4::Auth::getuserflags($patron->flags, $patron->userid); >-if (ref $flags->{reserveforothers} && $flags->{reserveforothers}){ >+my $userflags = C4::Auth::getuserflags($patron->flags, $patron->userid); >+if ($userflags->{reserveforothers}){ > $template->param( has_reserveforothers_permission => 1); > } > >-- >2.1.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 17765
:
70584
| 70662 |
84165