usage suspend vs admin suspend -- avoid actual cust_pkg::suspend except legacy cases
[freeside.git] / httemplate / config / config-view.cgi
index ff7913d..7f2a1b2 100644 (file)
@@ -1,4 +1,3 @@
-<!-- mason kludge -->
 <% include("/elements/header.html",'View Configuration', menubar( 'Main Menu' => $p,
                                      'Edit Configuration' => 'config.cgi' ) ) %>
 % my $conf = new FS::Conf; my @config_items = $conf->config_items; 
             <tr>
               <td><font color="#ff0000">no type</font></td>
             </tr>
+% } elsif (   $type eq 'binary' ) {
+
+            <tr>
+              <% $conf->exists($i->key)
+                   ? qq!<a href="config-download.cgi?!. $i->key. qq!">download</a>!
+                   : 'empty'
+              %>
+            </tr>
 % } elsif (   $type eq 'textarea'
 %                      || $type eq 'editlist'
 %                      || $type eq 'selectmultiple' ) { 
@@ -90,3 +97,7 @@
 
 
 </body></html>
+<%init>
+die "access denied"
+  unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+</%init>