From 0930d22ffc440f80c1b222b2e750cadbabd9e8f6 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 13 Jan 2008 21:35:54 +0000 Subject: ACLs --- httemplate/edit/reg_code.cgi | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'httemplate/edit/reg_code.cgi') diff --git a/httemplate/edit/reg_code.cgi b/httemplate/edit/reg_code.cgi index 4ad39051a..e57ac09bf 100644 --- a/httemplate/edit/reg_code.cgi +++ b/httemplate/edit/reg_code.cgi @@ -1,16 +1,4 @@ -% -%my $agentnum = $cgi->param('agentnum'); -%$agentnum =~ /^(\d+)$/ or errorpage("illegal agentnum $agentnum"); -%$agentnum = $1; -%my $agent = qsearchs('agent', { 'agentnum' => $agentnum } ); -% -% - - -<% include("/elements/header.html",'Generate registration codes for '. $agent->agent, menubar( - 'Main Menu' => $p, - )) -%> +<% include('/elements/header.html', 'Generate registration codes for '. $agent->agent) %> <% include('/elements/error.html') %> @@ -39,5 +27,18 @@ registration codes for <% $agent->agent %> allowing the following package
- + + +<% include('/elements/footer.html') %> + +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +my $agentnum = $cgi->param('agentnum'); +$agentnum =~ /^(\d+)$/ or errorpage("illegal agentnum $agentnum"); +$agentnum = $1; +my $agent = qsearchs('agent', { 'agentnum' => $agentnum } ); + -- cgit v1.2.1