move cust_pay_batch::upload results subroutine to an FS::pay_batch method. upon...
[freeside.git] / httemplate / browse / access_user.html
index 5b78797..8eb3e33 100644 (file)
@@ -1,4 +1,26 @@
-<%
+<% include( 'elements/browse.html',
+                 'title'          => 'Internal Users',
+                 'menubar'        => [ #'Main menu' => $p,
+                                       'Internal access groups' => $p.'browse/access_group.html',
+                                     ],
+                 'html_init'      => $html_init,
+                 'html_posttotal' => $posttotal,
+                 'name'           => 'internal users',
+                 'query'          => { 'table'     => 'access_user',
+                                       'hashref'   => \%search,
+                                       'extra_sql' => 'ORDER BY last, first',
+                                     },
+                 'count_query'    => $count_query,
+                 'header'         => \@header,
+                 'fields'         => \@fields,
+                 'links'          => \@links,
+                 'style'          => \@style,
+             )
+%>
+<%init>
+
+die "access denied"
+  unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
 
 my $html_init = 
   "Internal users have access to the back-office interface.  Typically, this is your employees and contractors, but in a VISP setup, you can also add accounts for your reseller's employees.  It is <B>highly recommended</B> to add a <B>separate account for each person</B> rather than using role accounts.<BR><BR>".
@@ -77,22 +99,4 @@ push @fields, 'name',      $groups_sub;
 push @links,  $link,       '';
 $align .= 'll';
 
-%><%= include( 'elements/browse.html',
-                 'title'          => 'Internal Users',
-                 'menubar'        => [ #'Main menu' => $p,
-                                       'Internal access groups' => $p.'browse/access_group.html',
-                                     ],
-                 'html_init'      => $html_init,
-                 'html_posttotal' => $posttotal,
-                 'name'           => 'internal users',
-                 'query'          => { 'table'     => 'access_user',
-                                       'hashref'   => \%search,
-                                       'extra_sql' => 'ORDER BY last, first',
-                                     },
-                 'count_query'    => $count_query,
-                 'header'         => \@header,
-                 'fields'         => \@fields,
-                 'links'          => \@links,
-                 'style'          => \@style,
-             )
-%>
+</%init>