]> iEval git - gruntmaster-page.git/commitdiff
Require login to see problems in running contests
authorMarius Gavrilescu <marius@ieval.ro>
Thu, 10 Apr 2014 14:00:27 +0000 (17:00 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Thu, 10 Apr 2014 14:00:27 +0000 (17:00 +0300)
app.psgi

index d16fb4c591f636aab7607e34d907a6bc2909b32d..131dcb717b1b476f1e23f4850e360bba0c4f3067 100644 (file)
--- 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;
        ''
 }
 
This page took 0.018366 seconds and 4 git commands to generate.