X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fbrowse%2Frate.cgi;h=584891aea02125da4d83eb24fc521710c1eabefd;hb=5c38d5114cc5b2e8711abfb20b4d2cfb83f944f6;hp=c4ae2f0818ab190c7e591a6a6c5b7b513d43faa8;hpb=1a033848671cad2cbe7687b37fc718b3b2a68b83;p=freeside.git
diff --git a/httemplate/browse/rate.cgi b/httemplate/browse/rate.cgi
index c4ae2f081..584891aea 100644
--- a/httemplate/browse/rate.cgi
+++ b/httemplate/browse/rate.cgi
@@ -1,22 +1,4 @@
-<%
-
-my $html_init =
- 'Rate plans, regions and prefixes for VoIP and call billing.
'.
- qq!Add a rate plan!.
- qq! | Add a region!.
- '
- ';
-
-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.
'.
+qq!Add a rate plan!.
+qq! | Add a region!.
+'
+ ';
+
+my $count_query = 'SELECT COUNT(*) FROM rate';
+
+my $link = [ $p.'edit/rate.cgi?', 'ratenum' ];
+
+%init>