X-Git-Url: http://git.ieval.ro/?p=gruntmaster-page.git;a=blobdiff_plain;f=app.psgi;h=62a6f790815f47cbac9fa032b6fce550314c392e;hp=9908172efb807320b8562f03bc201b43a6048c40;hb=acef92e8dd279c526d98f61408f5d7f326348eab;hpb=f65bc88e9c4cfa7f17a32590728a4531a2356bbc diff --git a/app.psgi b/app.psgi index 9908172..62a6f79 100644 --- a/app.psgi +++ b/app.psgi @@ -24,6 +24,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 =~ m,/pb/$word/submit$,; + return 1 if $r->path =~ m,^/ct/$word/pb/$word, && time < contest_end $1; 0 } @@ -39,7 +40,7 @@ sub admin_required { sub require_admin { my $app = $_[0]; sub { - *__ANON__ = "require_admin_middleware"; + local *__ANON__ = "require_admin_middleware"; my $env = $_[0]; my $r = Plack::Request->new($env); $env->{'gruntmaster.reqadmin'} = 1 if admin_required $r->path;