sub (/src/:job) {
return NOT_FOUND if !job;
- forbid job->private || job->problem->private || job->contest && job->contest->is_running;
+ my $isowner = remote_user && remote_user->id eq job->rawowner;
+ forbid !$isowner && (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]]
},
my ($data, $th) = @_;
$th->attr(class => undef);
$th->namedlink(@$data);
+ $th->find('a')->edit_href(sub{s/$/?contest=$args{args}{contest}/});
};
$tree->fclass('problem')->iter3($args{problems}, $pbiter);
my $iter = sub {