]> iEval git - gruntmaster-page.git/commitdiff
Fix a typo in /src and force jobs in contests to be non-private
authorMarius Gavrilescu <marius@ieval.ro>
Wed, 21 Jan 2015 19:41:04 +0000 (21:41 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Wed, 21 Jan 2015 19:41:04 +0000 (21:41 +0200)
lib/Plack/App/Gruntmaster.pm

index 136f657028192cd05399dd61c3118ef92109928d..ee37a4e3a8ed378fd4b9646acfb2a40384f69390 100644 (file)
@@ -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},
This page took 0.022593 seconds and 4 git commands to generate.