From f4c33eb4f0061f46aab156caf937f5bd0fe0955a Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Tue, 25 Mar 2014 09:45:30 +0200 Subject: [PATCH] One more fix for require_admin --- app.psgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.psgi b/app.psgi index 0222a16..856d82c 100644 --- a/app.psgi +++ b/app.psgi @@ -45,7 +45,7 @@ sub is_problem_private { sub admin_required { local $_ = $_[0]; my $env = $_[1]; - return $db->contest($1)->owner->id if $env->{'gruntmaster.contest'} && $db->contest($env->{'gruntmaster.contest'})->start > time; + 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/)?$word, && ($db->job($1)->private || is_problem_private $db->job($1)->problem->id || $db->job($1)->contest && $db->contest($db->job($1)->contest)->start > time); '' -- 2.30.2