summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/elements/menu.html13
-rwxr-xr-xhttemplate/search/cust_main.html4
-rwxr-xr-xhttemplate/search/report_cust_main.html4
-rwxr-xr-xhttemplate/search/report_svc_acct.html2
-rwxr-xr-xhttemplate/search/report_svc_broadband.html2
-rwxr-xr-xhttemplate/search/report_svc_hardware.html2
6 files changed, 11 insertions, 16 deletions
diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html
index 14f8cd2f7..892345133 100644
--- a/httemplate/elements/menu.html
+++ b/httemplate/elements/menu.html
@@ -110,8 +110,7 @@ $report_customers{'List customers'} = [ \%report_customers_lists, 'List customer
$report_customers{'Zip code distribution'} = [ $fsurl. 'search/report_cust_main-zip.html', 'Zip codes by number of customers' ];
$report_customers{'Customer signup report'} = [ $fsurl. 'graph/report_cust_signup.html', 'New customer signups by date' ],
$report_customers{'Advanced customer reports'} = [ $fsurl. 'search/report_cust_main.html', 'by status, signup date, agent, etc.' ]
- if $curuser->access_right('List customers')
- && $curuser->access_right('List packages');
+ if $curuser->access_right('Advanced customer search');
tie my %report_invoices_open, 'Tie::IxHash',
'All open invoices' => [ $fsurl.'search/cust_bill.html?OPEN_date', 'All invoices with an unpaid balance' ],
@@ -201,10 +200,10 @@ foreach my $svcdb ( FS::part_svc->svc_tables() ) {
];
}
- if ( $svcdb =~ /^svc_(acct|broadband|hardware)$/ ) {
$report_svc{"Advanced $lcsname reports"} =
- [ $fsurl."search/report_$svcdb.html", '' ];
- }
+ [ $fsurl."search/report_$svcdb.html", '' ]
+ if $svcdb =~ /^svc_(acct|broadband|hardware)$/
+ && $curuser->access_right("Services: $name: Advanced search");
if ( $svcdb eq 'svc_phone' ) {
@@ -221,8 +220,8 @@ foreach my $svcdb ( FS::part_svc->svc_tables() ) {
}
- $report_services{$name} = [ \%report_svc, $longname ] if
- $curuser->access_right("Services: $name");
+ $report_services{$name} = [ \%report_svc, $longname ]
+ if $curuser->access_right("Services: $name");
}
diff --git a/httemplate/search/cust_main.html b/httemplate/search/cust_main.html
index bb5eae7e3..cc71672d0 100755
--- a/httemplate/search/cust_main.html
+++ b/httemplate/search/cust_main.html
@@ -33,9 +33,7 @@
<%init>
die "access denied"
- unless ( $FS::CurrentUser::CurrentUser->access_right('List customers') &&
- $FS::CurrentUser::CurrentUser->access_right('List packages')
- );
+ unless $FS::CurrentUser::CurrentUser->access_right('Advanced customer search');
my %search_hash = ();
diff --git a/httemplate/search/report_cust_main.html b/httemplate/search/report_cust_main.html
index c7a3ad954..04e04ee82 100755
--- a/httemplate/search/report_cust_main.html
+++ b/httemplate/search/report_cust_main.html
@@ -171,9 +171,7 @@
<%init>
die "access denied"
- unless ( $FS::CurrentUser::CurrentUser->access_right('List customers') &&
- $FS::CurrentUser::CurrentUser->access_right('List packages')
- );
+ unless $FS::CurrentUser::CurrentUser->access_right('Advanced customer search');
my $conf = new FS::Conf;
diff --git a/httemplate/search/report_svc_acct.html b/httemplate/search/report_svc_acct.html
index 14c284fb7..74bf5538e 100755
--- a/httemplate/search/report_svc_acct.html
+++ b/httemplate/search/report_svc_acct.html
@@ -114,7 +114,7 @@
<%init>
die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('List packages'); #?
+ unless $FS::CurrentUser::CurrentUser->access_right('Services: Accounts: Advanced search'); #?
my $title = emt('Account Report');
diff --git a/httemplate/search/report_svc_broadband.html b/httemplate/search/report_svc_broadband.html
index 37f21b79f..d7422eeae 100755
--- a/httemplate/search/report_svc_broadband.html
+++ b/httemplate/search/report_svc_broadband.html
@@ -76,7 +76,7 @@
<%init>
die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('List packages'); #?
+ unless $FS::CurrentUser::CurrentUser->access_right('Services: Wireless broadband services: Advanced search');
my $title = 'Broadband Service Report';
my $routernum = [ $cgi->param('routernum') || '' ];
diff --git a/httemplate/search/report_svc_hardware.html b/httemplate/search/report_svc_hardware.html
index 61ba4ab8a..b0bfc08c7 100755
--- a/httemplate/search/report_svc_hardware.html
+++ b/httemplate/search/report_svc_hardware.html
@@ -61,7 +61,7 @@ OR (SELECT COUNT(*) FROM svc_hardware
<%init>
die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('List packages'); #?
+ unless $FS::CurrentUser::CurrentUser->access_right('Services: Hardware: Advanced search');
my $title = 'Hardware Service Report';