From: ivan Date: Sat, 6 Sep 2008 20:54:24 +0000 (+0000) Subject: don't link to customer service view unless the user has the ACL to view the resulting... X-Git-Tag: root_of_webpay_support~389 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=2c90d42ca355e77804fbd0d4fe158dcdc38392c6 don't link to customer service view unless the user has the ACL to view the resulting page --- diff --git a/FS/FS/UI/Web.pm b/FS/FS/UI/Web.pm index 98d812d5e..2e9261bc0 100644 --- a/FS/FS/UI/Web.pm +++ b/FS/FS/UI/Web.pm @@ -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"; } +#this probably needs an ACL too... sub svc_export_links { my ($m, $part_svc, $cust_svc) = @_ or return '';