From: Marius Gavrilescu Date: Wed, 21 Jan 2015 19:41:04 +0000 (+0200) Subject: Fix a typo in /src and force jobs in contests to be non-private X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=34a258ae44bf68ce3d1d001eaadd0270e01f6e37;p=gruntmaster-page.git Fix a typo in /src and force jobs in contests to be non-private --- diff --git a/lib/Plack/App/Gruntmaster.pm b/lib/Plack/App/Gruntmaster.pm index 136f657..ee37a4e 100644 --- a/lib/Plack/App/Gruntmaster.pm +++ b/lib/Plack/App/Gruntmaster.pm @@ -112,7 +112,7 @@ sub dispatch_request{ sub (/src/:job) { return NOT_FOUND if !job; - forbid job->private || job->problem->private || job->contest && job->contest->private; + forbid job->private || job->problem->private || job->contest && job->contest->is_running; my @headers = ('X-Forever' => 1, 'Cache-Control' => 'public, max-age=604800', 'Content-Type' => CONTENT_TYPES->{job->format}); [200, \@headers, [job->source]] }, @@ -229,7 +229,7 @@ sub dispatch_request{ unlink $prog->path if $prog; my $newjob = db->jobs->create({ maybe contest => $_{contest}, - maybe private => problem->private, + maybe private => problem->private && !$_{contest}, date => time, extension => FORMAT_EXTENSION->{$_{prog_format}}, format => $_{prog_format},