RT# 82949 - changes section name from fees to pricing, better opiton
[freeside.git] / httemplate / edit / process / svc_acct_pop.cgi
index 5d699f2..6e823a8 100755 (executable)
@@ -1,5 +1,16 @@
-<!-- $Id: svc_acct_pop.cgi,v 1.3 2002-01-30 14:18:09 ivan Exp $ -->
-<%
+%if ( $error ) {
+%  $cgi->param('error', $error);
+<% $cgi->redirect(popurl(2). "svc_acct_pop.cgi?". $cgi->query_string ) %>
+%} else {
+<% $cgi->redirect(popurl(3). "browse/svc_acct_pop.cgi") %>
+%}
+<%init>
+
+my $curuser = $FS::CurrentUser::CurrentUser;
+
+die "access denied"
+  unless $curuser->access_right('Dialup configuration')
+      || $curuser->access_right('Dialup global configuration');
 
 my $popnum = $cgi->param('popnum');
 
@@ -19,11 +30,4 @@ if ( $popnum ) {
   $popnum=$new->getfield('popnum');
 }
 
-if ( $error ) {
-  $cgi->param('error', $error);
-  print $cgi->redirect(popurl(2). "svc_acct_pop.cgi?". $cgi->query_string );
-} else {
-  print $cgi->redirect(popurl(3). "browse/svc_acct_pop.cgi");
-}
-
-%>
+</%init>