summaryrefslogtreecommitdiff
path: root/httemplate/browse/agent.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/browse/agent.cgi')
-rwxr-xr-xhttemplate/browse/agent.cgi30
1 files changed, 16 insertions, 14 deletions
diff --git a/httemplate/browse/agent.cgi b/httemplate/browse/agent.cgi
index e9969b02a..063f259de 100755
--- a/httemplate/browse/agent.cgi
+++ b/httemplate/browse/agent.cgi
@@ -1,17 +1,3 @@
-%
-%
-% my %search;
-% if ( $cgi->param('showdisabled')
-% || !dbdef->table('agent')->column('disabled') ) {
-% %search = ();
-% } else {
-% %search = ( 'disabled' => '' );
-% }
-%
-% my $conf = new FS::Conf;
-%
-%
-
<% include("/elements/header.html",'Agent Listing', menubar(
'Main Menu' => $p,
'Agent Types' => $p. 'browse/agent_type.cgi',
@@ -370,3 +356,19 @@ Unused
</TABLE>
</BODY>
</HTML>
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+
+my %search;
+if ( $cgi->param('showdisabled')
+ || !dbdef->table('agent')->column('disabled') ) {
+ %search = ();
+} else {
+ %search = ( 'disabled' => '' );
+}
+
+my $conf = new FS::Conf;
+
+</%init>