Bug 14391: Add granular permissions to the administration module
[koha.git] / admin / clone-rules.pl
index 41f4ad6..dd07125 100755 (executable)
 #
 # The script can be called with one of the parameters, both or none
 
-use strict;
-#use warnings; FIXME - Bug 2505
+use Modern::Perl;
 use CGI qw ( -utf8 );
 use C4::Context;
 use C4::Output;
 use C4::Auth;
 use C4::Koha;
 use C4::Debug;
-use C4::Branch; # GetBranches
 
 my $input = new CGI;
 my $dbh = C4::Context->dbh;
@@ -43,20 +41,15 @@ my ($template, $loggedinuser, $cookie)
                             query => $input,
                             type => "intranet",
                             authnotrequired => 0,
-                            flagsrequired => {parameters => 'parameters_remaining_permissions'},
+                            flagsrequired => {parameters => 'manage_circ_rules'},
                             debug => 1,
                             });
 
 my $frombranch = $input->param("frombranch");
 my $tobranch   = $input->param("tobranch");
-my $branchloop = GetBranchesLoop;
 
 $template->param(frombranch     => $frombranch)                if ($frombranch);
-$template->param(frombranchname => GetBranchName($frombranch)) if ($frombranch);
 $template->param(tobranch       => $tobranch)                  if ($tobranch);
-$template->param(tobranchname   => GetBranchName($tobranch))   if ($tobranch);
-
-$template->param(branchloop => $branchloop);
 
 if ($frombranch && $tobranch) {