This commit was generated by cvs2svn to compensate for changes in r5562,
[freeside.git] / httemplate / browse / rate.cgi
index c4ae2f0..584891a 100644 (file)
@@ -1,22 +1,4 @@
-<%
-
-my $html_init = 
-  'Rate plans, regions and prefixes for VoIP and call billing.<BR><BR>'.
-  qq!<A HREF="${p}edit/rate.cgi"><I>Add a rate plan</I></A>!.
-  qq! | <A HREF="${p}edit/rate_region.cgi"><I>Add a region</I></A>!.
-  '<BR><BR>
-   <SCRIPT>
-   function rate_areyousure(href) {
-    if (confirm("Are you sure you want to delete this rate plan?") == true)
-      window.location.href = href;
-   }
-   </SCRIPT>';
-
-my $count_query = 'SELECT COUNT(*) FROM rate';
-
-my $link = [ $p.'edit/rate.cgi?', 'ratenum' ];
-
-%><%= include( 'elements/browse.html',
+<% include( 'elements/browse.html',
                  'title'       => 'Rate plans',
                  'menubar'     => [ 'Main menu' => $p, ],
                  'html_init'   => $html_init,
@@ -31,3 +13,25 @@ my $link = [ $p.'edit/rate.cgi?', 'ratenum' ];
                  'links'       => [ $link, $link ],
              )
 %>
+<%init>
+
+die "access denied"
+  unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+
+my $html_init = 
+'Rate plans, regions and prefixes for VoIP and call billing.<BR><BR>'.
+qq!<A HREF="${p}edit/rate.cgi"><I>Add a rate plan</I></A>!.
+qq! | <A HREF="${p}edit/rate_region.cgi"><I>Add a region</I></A>!.
+'<BR><BR>
+ <SCRIPT>
+ function rate_areyousure(href) {
+  if (confirm("Are you sure you want to delete this rate plan?") == true)
+    window.location.href = href;
+ }
+ </SCRIPT>';
+
+my $count_query = 'SELECT COUNT(*) FROM rate';
+
+my $link = [ $p.'edit/rate.cgi?', 'ratenum' ];
+
+</%init>