From fdbdabb698b904cfb8cdc8befb87a76aa71642e9 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 13 Jan 2008 20:57:36 +0000 Subject: [PATCH] ACLs --- httemplate/browse/part_bill_event.cgi | 5 ++--- httemplate/search/cust_bill.html | 1 - httemplate/search/cust_bill_event.cgi | 25 +++++++++++++++---------- httemplate/search/cust_event.html | 25 +++++++++++++++---------- httemplate/search/cust_pay_batch.cgi | 1 - httemplate/search/prepay_credit.html | 1 - httemplate/search/queue.html | 1 - httemplate/search/report_prepaid_income.cgi | 4 ++-- httemplate/search/report_tax.cgi | 3 +-- httemplate/search/sqlradius.cgi | 8 +------- httemplate/search/timeworked.html | 1 - 11 files changed, 36 insertions(+), 39 deletions(-) diff --git a/httemplate/browse/part_bill_event.cgi b/httemplate/browse/part_bill_event.cgi index a7071bcde..11bc14e5c 100755 --- a/httemplate/browse/part_bill_event.cgi +++ b/httemplate/browse/part_bill_event.cgi @@ -1,4 +1,4 @@ -<% include("/elements/header.html",'Invoice Event Listing', menubar( 'Main Menu' => $p) ) %> +<% include('/elements/header.html', 'Invoice Event Listing') %> Invoice events are the deprecated, old-style actions taken on open invoices. Any events still listed here should be migrated to new-style events.

@@ -102,9 +102,8 @@ % } % } +<% include('/elements/footer.html') %> - - <%init> die "access denied" diff --git a/httemplate/search/cust_bill.html b/httemplate/search/cust_bill.html index 69384b813..9166f6dcb 100755 --- a/httemplate/search/cust_bill.html +++ b/httemplate/search/cust_bill.html @@ -213,7 +213,6 @@ function confirm_fax_process() { '; my $menubar = [ - 'Main menu' => $p, 'Print these invoices' => "javascript:confirm_print_process()", 'Email these invoices' => diff --git a/httemplate/search/cust_bill_event.cgi b/httemplate/search/cust_bill_event.cgi index 8f63d9cef..ff4168d6d 100644 --- a/httemplate/search/cust_bill_event.cgi +++ b/httemplate/search/cust_bill_event.cgi @@ -140,16 +140,21 @@ $html_init .= join("\n", map { qq!! } qw( print_ email_ fax_ ) ); -my $menubar = [ - 'Re-print these events' => - "javascript:print_process()", - 'Re-email these events' => - "javascript:email_process()", - ]; - -push @$menubar, 'Re-fax these events' => - "javascript:fax_process()" - if $conf->exists('hylafax'); +my $menubar = []; + +if ( $curuser->access_right('Resend invoices') ) { + + push @$menubar, 'Re-print these events' => + "javascript:print_process()", + 'Re-email these events' => + "javascript:email_process()", + ; + + push @$menubar, 'Re-fax these events' => + "javascript:fax_process()" + if $conf->exists('hylafax'); + +} my $link_cust = sub { my $cust_bill_event = shift; diff --git a/httemplate/search/cust_event.html b/httemplate/search/cust_event.html index dc6fd0582..d55b5c6d2 100644 --- a/httemplate/search/cust_event.html +++ b/httemplate/search/cust_event.html @@ -259,16 +259,21 @@ function confirm_fax_process() { '; -my $menubar = [ - 'Re-print these events' => - "javascript:confirm_print_process()", - 'Re-email these events' => - "javascript:confirm_email_process()", - ]; - -push @$menubar, 'Re-fax these events' => - "javascript:confirm_fax_process()" - if $conf->exists('hylafax'); +my $menubar = []; + +if ( $curuser->access_right('Resend invoices') ) { + + push @$menubar, 'Re-print these events' => + "javascript:confirm_print_process()", + 'Re-email these events' => + "javascript:confirm_email_process()", + ; + + push @$menubar, 'Re-fax these events' => + "javascript:confirm_fax_process()" + if $conf->exists('hylafax'); + +} my $link_cust = sub { my $cust_event = shift; diff --git a/httemplate/search/cust_pay_batch.cgi b/httemplate/search/cust_pay_batch.cgi index c678febf1..60dca8cba 100755 --- a/httemplate/search/cust_pay_batch.cgi +++ b/httemplate/search/cust_pay_batch.cgi @@ -1,7 +1,6 @@ <% include('elements/search.html', 'title' => 'Batch payment details', 'name' => 'batch details', - 'menubar' => ['Main Menu' => $p,], 'query' => $sql_query, 'count_query' => $count_query, 'html_init' => $pay_batch ? $html_init : '', diff --git a/httemplate/search/prepay_credit.html b/httemplate/search/prepay_credit.html index 43fc6a96c..96391fcbd 100644 --- a/httemplate/search/prepay_credit.html +++ b/httemplate/search/prepay_credit.html @@ -2,7 +2,6 @@ 'title' => 'Unused Prepaid Cards'. ($agent ? ' for '. $agent->agent : ''), 'menubar' => [ - 'Main menu' => $p, 'Generate cards' => $p.'edit/prepay_credit.cgi', ], 'name' => 'prepaid cards', diff --git a/httemplate/search/queue.html b/httemplate/search/queue.html index c343014cc..125a6f7f6 100644 --- a/httemplate/search/queue.html +++ b/httemplate/search/queue.html @@ -1,6 +1,5 @@ <% include( 'elements/search.html', 'title' => 'Job Queue', - 'menubar' => [ 'Main menu' => $p, ], 'name' => 'jobs', 'html_form' => qq!
!, 'query' => { 'table' => 'queue', diff --git a/httemplate/search/report_prepaid_income.cgi b/httemplate/search/report_prepaid_income.cgi index fd9b01ec1..27dbcbf9f 100644 --- a/httemplate/search/report_prepaid_income.cgi +++ b/httemplate/search/report_prepaid_income.cgi @@ -1,5 +1,5 @@ -<% include("/elements/header.html", 'Prepaid Income (Unearned Revenue) Report', - menubar( 'Main Menu'=>$p, ) ) %> +<% include("/elements/header.html", 'Prepaid Income (Unearned Revenue) Report') %> + <% table() %> Actual Unearned Revenue diff --git a/httemplate/search/report_tax.cgi b/httemplate/search/report_tax.cgi index 3519d722a..b029ec074 100755 --- a/httemplate/search/report_tax.cgi +++ b/httemplate/search/report_tax.cgi @@ -7,8 +7,7 @@ ( $ending == 4294967295 ? 'now' : time2str('%h %o %Y', $ending ) - ), - menubar( 'Main Menu'=>$p, ) + ) ) %> diff --git a/httemplate/search/sqlradius.cgi b/httemplate/search/sqlradius.cgi index 324729b6a..24b17d3b3 100644 --- a/httemplate/search/sqlradius.cgi +++ b/httemplate/search/sqlradius.cgi @@ -1,10 +1,4 @@ -<% include( '/elements/header.html', 'RADIUS Sessions', - include('/elements/menubar.html', - 'Main menu' => $p, # popurl(2), - ), - - ) -%> +<% include( '/elements/header.html', 'RADIUS Sessions') %> % ### % # and finally, display the thing diff --git a/httemplate/search/timeworked.html b/httemplate/search/timeworked.html index 6bff4149b..b3b31b4f3 100644 --- a/httemplate/search/timeworked.html +++ b/httemplate/search/timeworked.html @@ -1,6 +1,5 @@ <% include( 'elements/search.html', 'title' => 'Time Worked', - 'menubar' => [ 'Main menu' => $p, ], 'name' => 'time', 'html_form' => qq!!, 'query' => $query, -- 2.11.0