This commit was generated by cvs2svn to compensate for changes in r5562,
[freeside.git] / httemplate / search / cdr.html
index e3d6043..54c804c 100644 (file)
@@ -1,4 +1,19 @@
-<%
+<% include( 'elements/search.html',
+               'title' => $title,
+               'name'  => 'call detail records',
+               'query' => { 'table'   => 'cdr',
+                            'hashref' => $hashref
+                          },
+               'count_query' => $count_query,
+               'header' => [ fields('cdr') ], #XXX fill in some nice names
+               'fields' => [ fields('cdr') ], #XXX fill in some pretty-print
+                                              # processing, etc.
+             )
+%>
+<%init>
+
+die "access denied"
+  unless $FS::CurrentUser::CurrentUser->access_right('List rating data');
 
 my $title = 'Call Detail Records';
 my $hashref = {};
@@ -23,15 +38,4 @@ if ( $cgi->param('freesidestatus') eq 'NULL' ) {
 
 }
 
-%><%= include( 'elements/search.html',
-               'title' => $title,
-               'name'  => 'call detail records',
-               'query' => { 'table'   => 'cdr',
-                            'hashref' => $hashref
-                          },
-               'count_query' => $count_query,
-               'header' => [ fields('cdr') ], #XXX fill in some nice names
-               'fields' => [ fields('cdr') ], #XXX fill in some pretty-print
-                                              # processing, etc.
-             )
-%>
+</%init>