invoice_sections_with_taxes per-agent, RT#79636
[freeside.git] / httemplate / misc / queue.cgi
index 8c1e536..5dee29b 100644 (file)
@@ -1,4 +1,8 @@
-<%
+<% $cgi->redirect(popurl(2). "search/queue.html") %>
+<%init>
+
+die "access denied"
+  unless $FS::CurrentUser::CurrentUser->access_right('Job queue');
 
 $cgi->param('action') =~ /^(new|del|(retry|remove) selected)$/
   or die "Illegal action";
@@ -9,7 +13,8 @@ if ( $action eq 'new' || $action eq 'del' ) {
   $cgi->param('jobnum') =~ /^(\d+)$/ or die "Illegal jobnum";
   my $jobnum = $1;
   $job = qsearchs('queue', { 'jobnum' => $1 })
-    or die "unknown jobnum $jobnum";
+    or die "unknown jobnum $jobnum - ".
+           "it probably completed normally or was removed by another user";
 }
 
 if ( $action eq 'new' ) {
@@ -41,6 +46,4 @@ if ( $action eq 'new' ) {
   }
 }
 
-print $cgi->redirect(popurl(2). "browse/queue.cgi");
-
-%>
+</%init>