summaryrefslogtreecommitdiff
path: root/httemplate/misc/custom_link_proxy.cgi
diff options
context:
space:
mode:
authorivan <ivan>2011-12-07 04:49:25 +0000
committerivan <ivan>2011-12-07 04:49:25 +0000
commit9dafe1bcc38121281d62ffe2d48eba6b8fd748e7 (patch)
treef9704a661cf3bf1a390b71f6a6c2ac0bee210a44 /httemplate/misc/custom_link_proxy.cgi
parentff4e86db92ebc49762302c40dd31e0325f9afd1c (diff)
add usernum to cust_main-custom_link, RT#15475
Diffstat (limited to 'httemplate/misc/custom_link_proxy.cgi')
-rw-r--r--httemplate/misc/custom_link_proxy.cgi5
1 files changed, 3 insertions, 2 deletions
diff --git a/httemplate/misc/custom_link_proxy.cgi b/httemplate/misc/custom_link_proxy.cgi
index 417fcebae..f3c6e376e 100644
--- a/httemplate/misc/custom_link_proxy.cgi
+++ b/httemplate/misc/custom_link_proxy.cgi
@@ -14,15 +14,16 @@ my $conf = new FS::Conf;
my $url = $conf->config('cust_main-custom_link');
my $agentnum = $cust_main->agentnum;
+my $curuser = $FS::CurrentUser::CurrentUser;
+my $usernum = $curuser->usernum;
# like eval(qq("$url")) but with fewer things that can go wrong
# and if $custnum isn't mentioned, assume it goes at the end
$url =~ s/\$custnum/$custnum/ or $url .= $custnum;
$url =~ s/\$agentnum/$agentnum/;
+$url =~ s/\$usernum/$usernum/;
#warn $url;
-my $curuser = $FS::CurrentUser::CurrentUser;
-
die "access denied"
unless $curuser->access_right('View customer');