From: Marius Gavrilescu Date: Wed, 9 Apr 2014 11:02:19 +0000 (+0300) Subject: Attempt to make jobs in a running contest private X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=d6e502386c8b708ca786fc6b6a2c3a083f3998ca;p=gruntmaster-page.git Attempt to make jobs in a running contest private --- diff --git a/app.psgi b/app.psgi index 750f57f..d16fb4c 100644 --- a/app.psgi +++ b/app.psgi @@ -58,7 +58,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'} || !is_problem_in_contest $1, $env->{'gruntmaster.contest'}; - 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); + 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->job($1)->contest->stop > time); '' }