summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorivan <ivan>2008-03-16 04:00:30 +0000
committerivan <ivan>2008-03-16 04:00:30 +0000
commit737b7470eed9fc4079a32216a54a003fbf075204 (patch)
tree9e30d9be2a2633791bb441c35a9ff615c94d87f4 /httemplate
parent9464e3517fcae6a735c14b3fb15b91f3886a884a (diff)
hide customer search if user does not have "List customers" ACL, closes: RT#3105
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/elements/header.html2
-rw-r--r--httemplate/elements/menu.html6
2 files changed, 5 insertions, 3 deletions
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 {
</TD>
<TD COLSPAN=1 BGCOLOR="#000000" ALIGN="right">
+% if ( $FS::CurrentUser::CurrentUser->access_right('List customers') ) {
<FORM ACTION="<%$fsurl%>search/cust_main.cgi" METHOD="GET" STYLE="margin:0">
<INPUT NAME="search_cust" TYPE="text" VALUE="(cust #, name, company or phone)" SIZE="28" onFocus="clearhint_search_cust(this);" onClick="clearhint_search_cust(this);" STYLE="vertical-align:bottom;text-align:right"><BR>
<A HREF="<%$fsurl%>search/report_cust_main.html" STYLE="color: #ffffff; font-size: 70%">Advanced</A>
<INPUT TYPE="submit" VALUE="Search customers" CLASS="fsblackbutton" onMouseOver="this.className='fsblackbuttonselected'; return true;" onMouseOut="this.className='fsblackbutton'; return true;" STYLE="font-size:70%">
</FORM>
+% }
</TD>
<TD COLSPAN=1 BGCOLOR="#000000" ALIGN="center">
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' ];