Always allow the creator of the survey to view the results (Closes #1282)
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 24 Oct 2010 13:57:42 +0000 (15:57 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 24 Oct 2010 13:57:42 +0000 (15:57 +0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
modules/survey.php

index 8ce9d73..fa2b5bc 100644 (file)
@@ -109,7 +109,7 @@ class SurveyModule extends PLModule
         } elseif (!$survey->isEnded() && !$survey->canSeeEarlyResults(S::user())) {
             return $this->show_error($page, "Le sondage ".$survey->getTitle()." n'est pas encore terminé.", 'survey');
         }
-        if (!$this->check_surveyPerms($page, $survey)) {
+        if (!$survey->canSeeEarlyResults(S::user()) && !$this->check_surveyPerms($page, $survey)) {
             return PL_DO_AUTH;
         }
         if ($show == 'csv') {