From: ivan Date: Sun, 16 Mar 2008 04:00:30 +0000 (+0000) Subject: hide customer search if user does not have "List customers" ACL, closes: RT#3105 X-Git-Tag: TRIXBOX_2_6~11 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=737b7470eed9fc4079a32216a54a003fbf075204 hide customer search if user does not have "List customers" ACL, closes: RT#3105 --- diff --git a/httemplate/elements/header.html b/httemplate/elements/header.html index 7bf56702d..0ee6f9c9e 100644 --- a/httemplate/elements/header.html +++ b/httemplate/elements/header.html @@ -154,11 +154,13 @@ input.fsblackbuttonselected { +% if ( $FS::CurrentUser::CurrentUser->access_right('List customers') ) {

Advanced
+% } diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html index f43fca1bb..0c74746b7 100644 --- a/httemplate/elements/menu.html +++ b/httemplate/elements/menu.html @@ -70,9 +70,9 @@ tie my %report_customers_search, 'Tie::IxHash'; $report_customers_search{'by ordering employee'} = [ $fsurl. 'search/cust_main-otaker.cgi' ] if $curuser->access_right('Configuration'); -tie my %report_customers, 'Tie::IxHash', - 'List customers' => [ \%report_customers_lists, 'List customers' ], -; +tie my %report_customers, 'Tie::IxHash'; +$report_customers{'List customers'} = [ \%report_customers_lists, 'List customers' ] + if $curuser->access_right('List customers'); $report_customers{'Search customers'} = [ \%report_customers_search, 'Search customers' ] if keys %report_customers_search; $report_customers{'Zip code distribution'} = [ $fsurl. 'search/report_cust_main-zip.html', 'Zip codes by number of customers' ]; diff --git a/rt/html/Elements/FreesideSearch b/rt/html/Elements/FreesideSearch index 2fed8fc73..8e609bb4b 100644 --- a/rt/html/Elements/FreesideSearch +++ b/rt/html/Elements/FreesideSearch @@ -1,3 +1,4 @@ +% if ( $FS::CurrentUser::CurrentUser->access_right('List customers') ) {

-Advanced +Advanced
+% }