don't show invoice resend and payment posting links if you can't do that anyway
[freeside.git] / httemplate / search / cust_bill.html
index 25a7ea0..2860f7a 100755 (executable)
@@ -213,15 +213,18 @@ function confirm_fax_process() {
 
 </SCRIPT>';
 
-my $menubar =  [
-                'Print these invoices' =>
-                  "javascript:confirm_print_process()",
-                'Email these invoices' =>
-                  "javascript:confirm_email_process()",
-              ];
-
-push @$menubar, 'Fax these invoices' =>
-                 "javascript:confirm_fax_process()"
- if $conf->exists('hylafax');
+my $menubar = [];
+
+if ( $FS::CurrentUser::CurrentUser->access_right('Resend invoices') ) {
+
+  push @$menubar, 'Print these invoices' =>
+                    "javascript:confirm_print_process()",
+                  'Email these invoices' =>
+                    "javascript:confirm_email_process()";
+
+  push @$menubar, 'Fax these invoices' =>
+                    "javascript:confirm_fax_process()"
+    if $conf->exists('hylafax');
+}
 
 </%init>