One more fix for require_admin
[gruntmaster-page.git] / app.psgi
index 0222a168b80d395e95aaeeaf54f470459df90988..856d82c20baec055ec268114cab49614efaac15e 100644 (file)
--- 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);
        ''
This page took 0.009129 seconds and 4 git commands to generate.