[freeside-commits] freeside/httemplate/browse addr_block.cgi, 1.8, 1.9 router.cgi, 1.12, 1.13 svc_acct_pop.cgi, 1.20, 1.21
Jeff Finucane,420,,
jeff at wavetail.420.am
Sat Jun 28 12:25:25 PDT 2008
- Previous message: [freeside-commits] freeside/FS/FS AccessRight.pm, 1.27, 1.28 addr_block.pm, 1.7, 1.8 router.pm, 1.3, 1.4 svc_broadband.pm, 1.14, 1.15
- Next message: [freeside-commits] freeside/httemplate/edit allocate.html, 1.2, 1.3 router.cgi, 1.7, 1.8 svc_acct_pop.cgi, 1.10, 1.11 svc_broadband.cgi, 1.16, 1.17
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/httemplate/browse
In directory wavetail.420.am:/tmp/cvs-serv20117/httemplate/browse
Modified Files:
addr_block.cgi router.cgi svc_acct_pop.cgi
Log Message:
agent virtualize address blocks and routers
Index: router.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/browse/router.cgi,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- router.cgi 18 Apr 2008 03:29:59 -0000 1.12
+++ router.cgi 28 Jun 2008 19:25:23 -0000 1.13
@@ -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 @@
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>
Index: svc_acct_pop.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/browse/svc_acct_pop.cgi,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- svc_acct_pop.cgi 11 Mar 2007 04:13:27 -0000 1.20
+++ svc_acct_pop.cgi 28 Jun 2008 19:25:23 -0000 1.21
@@ -27,8 +27,11 @@
%>
<%init>
+my $curuser = $FS::CurrentUser::CurrentUser;
+
die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+ unless $curuser->access_right('Engineering configuration')
+ || $curuser->access_right('Engineering global configuration');
my $html_init = qq!
<A HREF="${p}edit/svc_acct_pop.cgi"><I>Add new Access Number</I></A>
Index: addr_block.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/browse/addr_block.cgi,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- addr_block.cgi 18 Apr 2008 03:29:59 -0000 1.8
+++ addr_block.cgi 28 Jun 2008 19:25:23 -0000 1.9
@@ -2,13 +2,13 @@
'title' => 'Address Blocks',
'name' => 'address block',
'html_init' => $html_init,
- 'html_form' => $html_form,
+ 'html_foot' => $html_foot,
'query' => { 'table' => 'addr_block',
'hashref' => {},
'extra_sql' => $extra_sql,
'order_by' => $order_by,
},
- 'count_query' => "SELECT count(*) from addr_block $extra_sql",
+ 'count_query' => "SELECT count(*) from addr_block $count_sql",
'header' => [ 'Address Block',
'Router',
'Action(s)',
@@ -42,17 +42,26 @@
'border-right:none;',
'border-left:none;',
],
+ '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 $path = $p2 . "edit/process/addr_block";
-my $extra_sql = " ";
+my $extra_sql = "";
+
+my $count_sql = "WHERE ". $FS::CurrentUser::CurrentUser->agentnums_sql(
+ 'null_right' => 'Engineering global configuration',
+);
+
my $order_by = "ORDER BY ";
$order_by .= "inet(ip_gateway), " if driver_name =~ /^Pg/i;
$order_by .= "inet_aton(ip_gateway), " if driver_name =~ /^mysql/i;
@@ -74,10 +83,16 @@
"javascript:addr_block_areyousure('$path/$verb.cgi?blocknum=$num', '$verb')";
};
-my $html_form = qq(
+my $html_foot = qq(
<FORM ACTION="$path/add.cgi" METHOD="POST">
Gateway/Netmask:
<INPUT TYPE="text" NAME="ip_gateway" SIZE="15">/<INPUT TYPE="text" NAME="ip_netmask" SIZE="2">
+);
+$html_foot .= include( '/elements/select-agent.html',
+ 'agent_virt' => 1,
+ 'agent_null_right' => 'Engineering global configuration',
+ );
+$html_foot .= qq(
<INPUT TYPE="submit" NAME="submit" VALUE="Add">
</FORM>
);
- Previous message: [freeside-commits] freeside/FS/FS AccessRight.pm, 1.27, 1.28 addr_block.pm, 1.7, 1.8 router.pm, 1.3, 1.4 svc_broadband.pm, 1.14, 1.15
- Next message: [freeside-commits] freeside/httemplate/edit allocate.html, 1.2, 1.3 router.cgi, 1.7, 1.8 svc_acct_pop.cgi, 1.10, 1.11 svc_broadband.cgi, 1.16, 1.17
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list