put the C in ACL here, too
[freeside.git] / httemplate / config / config-download.cgi
1 %
2 %
3 %my $conf=new FS::Conf;
4 %
5 %http_header('Content-Type' => 'application/x-unknown' );
6 %
7 %die "No configuration variable specified (bad URL)!" # umm
8 %  unless $cgi->keywords;
9 %my($query) = $cgi->keywords;
10 %$query =~  /^([\w -\)+-\/@;:?=[\]]+)$/;
11 %my $name = $1;
12 %
13 %http_header('Content-Disposition' => "attachment; filename=$name" );
14 % print $conf->config_binary($name);
15 <%init>
16 die "access denied"
17   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
18 </%init>