we're not a disk drive manufacturer
[freeside.git] / FS / FS / UI / Web.pm
index 98d812d..744d5f7 100644 (file)
@@ -138,6 +138,10 @@ sub svc_label_link {
 
 sub svc_X_link {
   my ($x, $m, $part_svc, $cust_svc) = @_ or return '';
+
+  return $x
+   unless $FS::CurrentUser::CurrentUser->access_right('View customer services');
+
   my $ahref = svc_url(
     'ahref'    => 1,
     'm'        => $m,
@@ -149,6 +153,7 @@ sub svc_X_link {
   "$ahref$x</A>";
 }
 
+#this probably needs an ACL too...
 sub svc_export_links {
   my ($m, $part_svc, $cust_svc) = @_ or return '';
 
@@ -209,6 +214,8 @@ sub cust_header {
   warn "FS::UI:Web::cust_header called"
     if $DEBUG;
 
+  my $conf = new FS::Conf;
+
   my %header2method = (
     'Customer'                 => 'name',
     'Cust. Status'             => 'ucfirst_cust_status',
@@ -234,6 +241,8 @@ sub cust_header {
     'Payment Type'             => 'payby',
     'Current Balance'          => 'current_balance',
   );
+  $header2method{'Cust#'} = 'display_custnum'
+    if $conf->exists('cust_main-default_agent_custid');
 
   my %header2colormethod = (
     'Cust. Status' => 'cust_statuscolor',
@@ -256,7 +265,6 @@ sub cust_header {
 
   } else {
 
-    my $conf = new FS::Conf;
     if (    $conf->exists('cust-fields')
          && $conf->config('cust-fields') =~ /^([\w\. \|\#\(\)]+):?/
        )