ACLs
[freeside.git] / httemplate / edit / process / svc_domain.cgi
index 19f8eb4..9993a87 100755 (executable)
@@ -1,4 +1,13 @@
-<%
+%if ($error) {
+%  $cgi->param('error', $error);
+<% $cgi->redirect(popurl(2). "svc_domain.cgi?". $cgi->query_string ) %>
+%} else {
+<% $cgi->redirect(popurl(3). "view/svc_domain.cgi?$svcnum") %>
+%}
+<%init>
+
+die "access denied"
+  unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific?
 
 #remove this to actually test the domains!
 $FS::svc_domain::whois_hack = 1;
@@ -21,11 +30,4 @@ if ($cgi->param('svcnum')) {
   $svcnum=$new->svcnum;
 }
 
-if ($error) {
-  $cgi->param('error', $error);
-  print $cgi->redirect(popurl(2). "svc_domain.cgi?". $cgi->query_string );
-} else {
-  print $cgi->redirect(popurl(3). "view/svc_domain.cgi?$svcnum");
-}
-
-%>
+</%init>