fix small side-effect of mysql-compat change eliminating DISTINCT ON: map changing...
[freeside.git] / httemplate / search / queue.html
index 675fccd..c343014 100644 (file)
@@ -1,17 +1,3 @@
-%
-%
-%my $hashref = {};
-%
-%my $conf = new FS::Conf;
-%my $dangerous = $conf->exists('queue_dangerous_controls');
-%
-%my $noactions = 0;
-%
-%my $count_query = 'SELECT COUNT(*) FROM queue'; # + $hashref
-%
-%my $areboxes = 0;
-%
-%
 <% include( 'elements/search.html',
                  'title'       => 'Job Queue',
                  'menubar'     => [ 'Main menu' => $p, ],
              )
 
 %>
+<%init>
+
+die "access denied"
+  unless $FS::CurrentUser::CurrentUser->access_right('Job queue');
+
+my $hashref = {};
+
+my $conf = new FS::Conf;
+my $dangerous = $conf->exists('queue_dangerous_controls');
+
+my $noactions = 0;
+
+my $count_query = 'SELECT COUNT(*) FROM queue'; # + $hashref
+
+my $areboxes = 0;
+
+</%init>