[freeside-commits] freeside/httemplate/elements menu.html, 1.20.2.12, 1.20.2.13 header.html, 1.13.2.6, 1.13.2.7

Ivan,,, ivan at wavetail.420.am
Sat Mar 15 21:00:35 PDT 2008


Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail.420.am:/tmp/cvs-serv11202/httemplate/elements

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	menu.html header.html 
Log Message:
hide customer search if user does not have "List customers" ACL, closes: RT#3105

Index: menu.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/menu.html,v
retrieving revision 1.20.2.12
retrieving revision 1.20.2.13
diff -u -d -r1.20.2.12 -r1.20.2.13
--- menu.html	25 Jan 2008 18:26:06 -0000	1.20.2.12
+++ menu.html	16 Mar 2008 04:00:31 -0000	1.20.2.13
@@ -70,9 +70,9 @@
 $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' ];

Index: header.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/header.html,v
retrieving revision 1.13.2.6
retrieving revision 1.13.2.7
diff -u -d -r1.13.2.6 -r1.13.2.7
--- header.html	2 Mar 2008 03:07:40 -0000	1.13.2.6
+++ header.html	16 Mar 2008 04:00:31 -0000	1.13.2.7
@@ -154,11 +154,13 @@
         </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">



More information about the freeside-commits mailing list