X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fmisc%2Fdump.cgi;h=3b60b20efc300a93439ac9210abfc16c337b8c45;hp=e8f4b6f383f45279b0fbb051f91064e6ec9d2b23;hb=3f2a7b01b59902faed5767d81e2959e131bdbdfd;hpb=c8cccb4a92adceb943c635fe62dad0d034462ce0 diff --git a/httemplate/misc/dump.cgi b/httemplate/misc/dump.cgi index e8f4b6f38..3b60b20ef 100644 --- a/httemplate/misc/dump.cgi +++ b/httemplate/misc/dump.cgi @@ -1,3 +1,5 @@ +% die "access denied" +% unless $FS::CurrentUser::CurrentUser->access_right('Export'); % % if ( driver_name =~ /^Pg$/ ) { % my $dbname = (split(':', datasrc))[2]; @@ -7,7 +9,7 @@ % } % open(DUMP,"pg_dump $dbname |"); % } else { -% eidiot "don't (yet) know how to dump ". driver_name. " databases\n"; +% errorpage("don't (yet) know how to dump ". driver_name. " databases"); % } % % http_header('Content-Type' => 'text/plain' ); @@ -16,5 +18,3 @@ % print $_; % } % close DUMP; -% -