From 94c044e0e181a14ebc7c2c748fd745ff2a74ebe3 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 24 Mar 2015 10:55:50 +0100 Subject: [PATCH] [Signed-off] Bug 13898: Remove CANDELETEUSER code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This code is never used. The permission to delete a patron is now done in members-toolbar.inc using CAN_user_borrowers. It's the good way to do. Test plan: git grep CANDELETEUSER should not return any result Followed test plan. No CANDELETEUSER found. Signed-off-by: Marc VĂ©ron --- members/moremember.pl | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/members/moremember.pl b/members/moremember.pl index 92fe2d9..7dc7ef3 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -277,23 +277,6 @@ foreach (@$alerts) { $_->{relatedto} = findrelatedto( $_->{type}, $_->{externalid} ); } -my $candeleteuser; -my $userenv = C4::Context->userenv; -if ( C4::Context->IsSuperLibrarian() ) { - $candeleteuser = 1; -} -elsif ( C4::Context->preference("IndependentBranches") ) { - $candeleteuser = ( $data->{'branchcode'} eq $userenv->{branch} ); -} -else { - if ( C4::Auth::getuserflags( $userenv->{flags}, $userenv->{number} )->{borrowers} ) { - $candeleteuser = 1; - } - else { - $candeleteuser = 0; - } -} - # Add sync data to the user data if ( C4::Context->preference('NorwegianPatronDBEnable') && C4::Context->preference('NorwegianPatronDBEnable') == 1 ) { my $sync = NLGetSyncDataFromBorrowernumber( $borrowernumber ); @@ -360,7 +343,6 @@ $template->param( $data->{'categorycode'} => 1 ); $template->param( detailview => 1, AllowRenewalLimitOverride => C4::Context->preference("AllowRenewalLimitOverride"), - CANDELETEUSER => $candeleteuser, roadtype => $roadtype, borrowernumber => $borrowernumber, othernames => $data->{'othernames'}, -- 1.7.10.4