From 2bc307c99816b7100c50a41800056ced2fcc8418 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 24 Mar 2015 10:55:50 +0100 Subject: [PATCH] Bug 13898: Remove CANDELETEUSER code MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 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 Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- members/moremember.pl | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/members/moremember.pl b/members/moremember.pl index 92fe2d94a9..7dc7ef3e5b 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'}, -- 2.39.5