From: Marius Gavrilescu Date: Wed, 26 Mar 2014 17:05:12 +0000 (+0200) Subject: Make jobs private during contests, not just before contests X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=9d4e243effa3f5178fa23bf8b222f1cc666d6388;p=gruntmaster-page.git Make jobs private during contests, not just before contests --- diff --git a/app.psgi b/app.psgi index de07be7..b6ba34f 100644 --- a/app.psgi +++ b/app.psgi @@ -48,7 +48,7 @@ sub admin_required { my $env = $_[1]; return $db->contest($env->{'gruntmaster.contest'})->owner->id if $env->{'gruntmaster.contest'} && $db->contest($env->{'gruntmaster.contest'})->start > time; return $db->problem($1)->owner->id if m,^/pb/$word, && is_problem_private $1 || $env->{'gruntmaster.problem'} && is_problem_private $env->{'gruntmaster.problem'}; - return $db->job ($1)->owner->id if m,^/log/(?:src/)?$number, && ($db->job($1)->private || is_problem_private $db->job($1)->problem->id || $db->job($1)->contest && $db->contest($db->job($1)->contest)->start > time); + return $db->job ($1)->owner->id if m,^/log/(?:src/)?$number, && ($db->job($1)->private || is_problem_private $db->job($1)->problem->id || $db->job($1)->contest && $db->contest($db->job($1)->contest)->stop > time); '' }