fix very strange "Undefined subroutine &FS::UI::Web::rooturl" with an explicit import...
[freeside.git] / httemplate / view / cust_bill-logo.cgi
index 235485f..e2f810c 100755 (executable)
@@ -1,4 +1,8 @@
-<%
+<% $conf->config_binary("logo$templatename.png") %>
+<%init>
+
+die "access denied"
+  unless $FS::CurrentUser::CurrentUser->access_right('View invoices');
 
 my $conf = new FS::Conf;
 
@@ -12,4 +16,5 @@ if ( $templatename && $conf->exists("logo_$templatename.png") ) {
 }
 
 http_header('Content-Type' => 'image/png' );
-%><%= $conf->config_binary("logo$templatename.png") %>
+
+</%init>