X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fmisc%2Fcacti_graphs.html;h=9a90b894d84eb752419665915308d8dc1b1dc392;hp=90a435091d1669ba4299e2a658ac3ecced431853;hb=acb5db886076201922167d39d76fd9b3e9e54c9c;hpb=9cfdddf49df7d5f47691ca467d9fbae51bfd71a0 diff --git a/httemplate/misc/cacti_graphs.html b/httemplate/misc/cacti_graphs.html index 90a435091..9a90b894d 100644 --- a/httemplate/misc/cacti_graphs.html +++ b/httemplate/misc/cacti_graphs.html @@ -43,6 +43,21 @@ die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('View customer services'); my $svcnum = $cgi->param('svcnum') or die 'Illegal svcnum'; + +# false laziness with view/elements/svc_Common.html +# only doing this to check agent access, don't actually use $svc_x +my $svc_x = qsearchs({ + 'select' => 'svc_broadband.*', + 'table' => 'svc_broadband', + 'addl_from' => ' LEFT JOIN cust_svc USING ( svcnum ) '. + ' LEFT JOIN cust_pkg USING ( pkgnum ) '. + ' LEFT JOIN cust_main USING ( custnum ) ', + 'hashref' => { 'svcnum' => $svcnum }, + 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql( + 'null_right' => 'View/link unlinked services' + ), +}) or die "Unknown svcnum $svcnum in svc_broadband table\n"; + my $load = $cgi->param('load'); my $graphnum = $cgi->param('graphnum') || '';