options to limit access to full customer list, #15928
[freeside.git] / httemplate / search / elements / search-html.html
index af0c8fc..53167c2 100644 (file)
 
             </TD>
 
-%           unless ( $opt{'disable_download'} || $type eq 'html-print' ) { 
+%           if ( $curuser->access_right('Download report data')
+%                 and !$opt{'disable_download'}
+%                 and $type ne 'html-print' ) { 
 
               <TD ALIGN="right">
 
 %   } 
 <%init>
 
+my $curuser = $FS::CurrentUser::CurrentUser;
+
 my %args = @_;
 my $type           = $args{'type'};
 my $header         = $args{'header'};