]> iEval git - gruntmaster-page.git/commitdiff
Add a "private" parameter to /log/ and /pb/
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 4 Jan 2015 15:28:11 +0000 (17:28 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 4 Jan 2015 15:28:11 +0000 (17:28 +0200)
lib/Plack/App/Gruntmaster.pm

index da00862dfa48a6579aa092687c2785769f877757..b011ffa048e766bdfc6ac80a87f654953ae58eb5 100644 (file)
@@ -152,8 +152,14 @@ sub dispatch_request{
 
                sub (/us/)                                        { response us => 'Users', {us => db->user_list} },
                sub (/ct/  + ?:owner~)                            { response ct => 'Contests', db->contest_list(%_) },
-               sub (/log/ + ?:contest~&:owner~&:page~&:problem~) { response log => 'Job list', {%{db->job_list(%_)}, maybe contest => $_{contest}} },
-               sub (/pb/  + ?:owner~&:contest~)                  { response pb => 'Problems', {%{db->problem_list(%_)}, maybe contest => $_{contest}} },
+               sub (/log/ + ?:contest~&:owner~&:page~&:problem~&:private~) {
+                       forbid $_{private};
+                       response log => 'Job list', {%{db->job_list(%_)}, maybe contest => $_{contest}}
+               },
+               sub (/pb/  + ?:owner~&:contest~&private~)                   {
+                       forbid $_{private};
+                       response pb => 'Problems', {%{db->problem_list(%_)}, maybe contest => $_{contest}}
+               },
 
                sub (/us/:user)    { response us_entry => user->name, db->user_entry($_{user}) },
                sub (/ct/:contest) { response ct_entry => contest->name, db->contest_entry($_{contest}) },
This page took 0.031154 seconds and 4 git commands to generate.