From 34a258ae44bf68ce3d1d001eaadd0270e01f6e37 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Wed, 21 Jan 2015 21:41:04 +0200 Subject: [PATCH] Fix a typo in /src and force jobs in contests to be non-private --- lib/Plack/App/Gruntmaster.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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}, -- 2.39.2