CHttpException

We are sorry but you don't have permissions to do this.

/opt/limesurvey/application/controllers/survey/SurveyIndex.php(269)

257         if ($this->surveyCantBeViewedWithCurrentPreviewAccess($surveyid, $isSurveyActive, $surveyExists)) {
258             $bPreviewRight = $this->userHasPreviewAccessSession($surveyid);
259 
260             if ($bPreviewRight === false) {
261                 $event    = new PluginEvent('onSurveyDenied');
262                 $event->set('surveyId', $surveyid);
263                 $event->set('reason', 'noPreviewPermission');
264 
265                 App()->getPluginManager()->dispatchEvent($event);
266                 if (Permission::model()->getUserId()) {
267                     throw new CHttpException(403, gT("We are sorry but you don't have permissions to do this.", 'unescaped'));
268                 }
269                 throw new CHttpException(401, gT("We are sorry but you don't have permissions to do this.", 'unescaped'));
270             }
271         }
272 
273         // TODO can this be moved to the top?
274         // (Used to be global, used in ExpressionManager, merged into amVars. If not filled in === '')
275         // can this be added in the first computation of $redata?
276         if (isset($_SESSION['survey_' . $surveyid]['srid'])) {
277             $saved_id = $_SESSION['survey_' . $surveyid]['srid'];
278         }
279 
280         // recompute $redata since $saved_id used to be a global
281         $redata = compact(array_keys(get_defined_vars()));

Stack Trace

#0
+
 /opt/limesurvey/application/controllers/survey/SurveyIndex.php(22): SurveyIndex->action()
17     public $oTemplate;
18 
19     public function run()
20     {
21         useFirebug();
22         $this->action();
23     }
24 
25     /**
26      *
27      * todo: this function is toooo long, to many things happening here. Should be refactored asap!
#8
+
 /opt/limesurvey/index.php(161): CApplication->run()
156 require_once APPPATH . 'core/LSYii_Application' . EXT;
157 
158 $config = require_once(APPPATH . 'config/internal' . EXT);
159 
160 Yii::$enableIncludePath = false;
161 Yii::createApplication('LSYii_Application', $config)->run();
162 
163 /* End of file index.php */
164 /* Location: ./index.php */
2024-03-28 20:11:51 nginx/1.18.0 Yii Framework/1.1.29