[freeside-commits] freeside/httemplate/misc/process nms-add_router.html, 1.1, 1.2 nms-add_iface.html, 1.4, 1.5
Erik Levinson
levinse at wavetail.420.am
Sat May 14 18:43:41 PDT 2011
Update of /home/cvs/cvsroot/freeside/httemplate/misc/process
In directory wavetail.420.am:/tmp/cvs-serv14647/httemplate/misc/process
Modified Files:
nms-add_router.html nms-add_iface.html
Log Message:
torrus: add new access rights, add SNMP community option, RT10574
Index: nms-add_iface.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/process/nms-add_iface.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -d -r1.4 -r1.5
--- nms-add_iface.html 28 Feb 2011 23:47:07 -0000 1.4
+++ nms-add_iface.html 15 May 2011 01:43:39 -0000 1.5
@@ -5,7 +5,8 @@
</BODY></HTML>
<%init>
-# XXX: access rights
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Configure network monitoring');
my $host = $cgi->param('host');
die 'invalid host' unless $host =~ /^[0-9.a-zA-Z\-]+$/;
Index: nms-add_router.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/process/nms-add_router.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -d -r1.1 -r1.2
--- nms-add_router.html 5 Feb 2011 06:32:36 -0000 1.1
+++ nms-add_router.html 15 May 2011 01:43:38 -0000 1.2
@@ -2,12 +2,16 @@
</BODY></HTML>
<%init>
-# XXX: access rights
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Configure network monitoring');
my $host = $cgi->param('host');
die 'invalid host' unless $host =~ /^[0-9.a-zA-Z\-]+$/;
+my $community = $cgi->param('community');
+die 'invalid SNMP community string' unless $community =~ /^[0-9.a-zA-Z\-]*$/;
+
my $nms = new FS::NetworkMonitoringSystem;
-$nms->add_router($host);
+$nms->add_router($host,$community);
</%init>
More information about the freeside-commits
mailing list