summaryrefslogtreecommitdiff
path: root/httemplate/browse/router.cgi
diff options
context:
space:
mode:
authorjeff <jeff>2008-06-28 19:25:24 +0000
committerjeff <jeff>2008-06-28 19:25:24 +0000
commita1871d3d13c1dafa93b956762c0d23728d261da7 (patch)
treeecd799ff28ca27d5e2ef07a615bcac49621dd391 /httemplate/browse/router.cgi
parent7588be4eb948426b972d0238dcdbb1537dc6a72a (diff)
agent virtualize address blocks and routers
Diffstat (limited to 'httemplate/browse/router.cgi')
-rw-r--r--httemplate/browse/router.cgi13
1 files changed, 11 insertions, 2 deletions
diff --git a/httemplate/browse/router.cgi b/httemplate/browse/router.cgi
index 9d856f67c..9f7167329 100644
--- a/httemplate/browse/router.cgi
+++ b/httemplate/browse/router.cgi
@@ -6,7 +6,7 @@
'hashref' => {},
'extra_sql' => $extra_sql,
},
- 'count_query' => "SELECT count(*) from router $extra_sql",
+ 'count_query' => "SELECT count(*) from router $count_sql",
'header' => [ 'Router name',
'Address block(s)',
],
@@ -19,12 +19,16 @@
'links' => [ [ "${p2}edit/router.cgi?", 'routernum' ],
'',
],
+ 'agent_virt' => 1,
+ 'agent_null_right'=> "Engineering global configuration",
+ 'agent_pos' => 1,
)
%>
<%init>
die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+ unless $FS::CurrentUser::CurrentUser->access_right('Engineering configuration')
+ || $FS::CurrentUser::CurrentUser->access_right('Engineering global configuration');
my $p2 = popurl(2);
my $extra_sql = '';
@@ -40,4 +44,9 @@ if ($cgi->param('hidecustomerrouters') eq '1') {
push @menubar, 'Hide customer routers', $cgi->self_url();
}
+my $count_sql = $extra_sql. ( $extra_sql =~ /WHERE/ ? ' AND' : 'WHERE' ).
+ $FS::CurrentUser::CurrentUser->agentnums_sql(
+ 'null_right' => 'Engineering global configuration',
+ );
+
</%init>