From: Marius Gavrilescu Date: Thu, 10 Apr 2014 14:00:27 +0000 (+0300) Subject: Require login to see problems in running contests X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=805b8c6c47605fe94d1d67ebb9c8d27bd6ed815d;p=plack-app-gruntmaster.git Require login to see problems in running contests --- diff --git a/app.psgi b/app.psgi index d16fb4c..131dcb7 100644 --- a/app.psgi +++ b/app.psgi @@ -27,7 +27,7 @@ sub debug { sub some_auth_required { my $r = Plack::Request->new($_[0]); return 1 if $_[0]->{'gruntmaster.reqadmin'} || $r->path eq '/action/passwd' || $r->path eq '/submit'; - return 1 if $r->path =~ m,^/ct/$word/pb/$word, && time < $db->contest($1)->stop; + return 1 if $r->path =~ m,^/pb/$word, && $_[0]->{'gruntmaster.contest'} && time < $db->contest($_[0]->{'gruntmaster.contest'})->stop; '' }