diff options
author | ivan <ivan> | 2008-01-13 21:14:19 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-01-13 21:14:19 +0000 |
commit | f49f11d4c3c4ba9480cc5c9acfaa606a5ba73ad1 (patch) | |
tree | 2104b5d1a05433756d3b91ee436cfaa8c24ab464 /httemplate/misc/delete-part_export.cgi | |
parent | 2d53d2ebdce80d0f0dc7f75ccf506a06c2f852f9 (diff) |
ACLs
Diffstat (limited to 'httemplate/misc/delete-part_export.cgi')
-rwxr-xr-x | httemplate/misc/delete-part_export.cgi | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/httemplate/misc/delete-part_export.cgi b/httemplate/misc/delete-part_export.cgi index 5f2ebb99c..52404e0c4 100755 --- a/httemplate/misc/delete-part_export.cgi +++ b/httemplate/misc/delete-part_export.cgi @@ -1,16 +1,20 @@ -% -% -%#untaint exportnum -%my($query) = $cgi->keywords; -%$query =~ /^(\d+)$/ || die "Illegal exportnum"; -%my $exportnum = $1; -% -%my $part_export = qsearchs('part_export',{'exportnum'=>$exportnum}); -% -%my $error = $part_export->delete; -%errorpage($error) if $error; -% -%print $cgi->redirect($p. "browse/part_export.cgi"); -% -% +% if ( $error ) { +% errorpage($error); +% } else { +<% $cgi->redirect($p. "browse/part_export.cgi") %> +% } +<%init> +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +#untaint exportnum +my($query) = $cgi->keywords; +$query =~ /^(\d+)$/ || die "Illegal exportnum"; +my $exportnum = $1; + +my $part_export = qsearchs('part_export',{'exportnum'=>$exportnum}); + +my $error = $part_export->delete; + +</%init> |