Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Check for attachment permission on upload, but not on view
  • Loading branch information
autarch committed Jul 29, 2009
1 parent c85cd98 commit 9ae1996
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/MojoMojo/Controller/Attachment.pm
Expand Up @@ -48,7 +48,6 @@ main attachment screen. Handles uploading of new attachments.

sub attachments : Global {
my ( $self, $c ) = @_;
$c->forward('auth') ;
$c->stash->{template} = 'page/attachments.tt';
$c->forward('check_file');
}
Expand All @@ -57,6 +56,8 @@ sub check_file : Private {
my ($self,$c)=@_;
my $page = $c->stash->{page};
if ( my $file = $c->req->params->{file} ) {
$c->forward('auth') ;

my $upload = $c->request->upload('file');
my (@att) =
$c->model("DBIC::Attachment")
Expand Down

0 comments on commit 9ae1996

Please sign in to comment.