From 278fc9cdbe7cdf7d081bc6f65fafe38a49d3589a 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 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 --- 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'}, -- 2.1.0