X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_main.cgi;h=b0f657fbb32d2601df425eb1a8c3eb97766e354d;hb=718f65eee1c797ea90a315b5f03fae75c80a5112;hp=e15447ae015aa5a2a1672c4fb91a866848797f2d;hpb=633c48448d9468690b7ad77eb6ff7c660a286658;p=freeside.git diff --git a/httemplate/search/cust_main.cgi b/httemplate/search/cust_main.cgi index e15447ae0..b0f657fbb 100755 --- a/httemplate/search/cust_main.cgi +++ b/httemplate/search/cust_main.cgi @@ -1,3 +1,6 @@ +%die "access denied" +% unless $FS::CurrentUser::CurrentUser->access_right('List customers'); +% %my $conf = new FS::Conf; %my $maxrecords = $conf->config('maxsearchrecordsperpage'); % @@ -82,10 +85,12 @@ % } % % if ( $cgi->param('otaker_on') ) { -% $cgi->param('otaker') =~ /^(\w{1,32})$/ or eidiot "Illegal otaker\n"; +% die "access denied" +% unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); +% $cgi->param('otaker') =~ /^(\w{1,32})$/ or errorpage("Illegal otaker"); % $search{otaker} = $1; % } elsif ( $cgi->param('agentnum_on') ) { -% $cgi->param('agentnum') =~ /^(\d+)$/ or eidiot "Illegal agentnum\n"; +% $cgi->param('agentnum') =~ /^(\d+)$/ or errorpage("Illegal agentnum"); % $search{agentnum} = $1; %# } else { %# die "unknown query..."; @@ -227,7 +232,7 @@ % -% eidiot "No matching customers found!\n"; +% errorpage("No matching customers found!"); %} else { % @@ -263,7 +268,7 @@ % % if ( $cgi->param('referral_custnum') ) { % $cgi->param('referral_custnum') =~ /^(\d+)$/ -% or eidiot "Illegal referral_custnum\n"; +% or errorpage("Illegal referral_custnum"); % my $referral_custnum = $1; % my $cust_main = qsearchs('cust_main', { custnum => $referral_custnum } ); % print '
'. @@ -283,7 +288,7 @@ % print '