CHttpException

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

/home/httpd/limesurvey/application/controllers/survey/index.php(221)

209         if ($this->_surveyCantBeViewedWithCurrentPreviewAccess($surveyid, $isSurveyActive, $surveyExists)) {
210             $bPreviewRight = $this->_userHasPreviewAccessSession($surveyid);
211 
212             if ($bPreviewRight === false) {
213                 $event    = new PluginEvent('onSurveyDenied');
214                 $event->set('surveyId', $surveyid);
215                 $event->set('reason', 'noPreviewPermission');
216 
217                 App()->getPluginManager()->dispatchEvent($event);
218                 if(Permission::getUserId()) {
219                     throw new CHttpException(403, gT("We are sorry but you don't have permissions to do this."));
220                 }
221                 throw new CHttpException(401, gT("We are sorry but you don't have permissions to do this."));
222             }
223         }
224 
225         // TODO can this be moved to the top?
226         // (Used to be global, used in ExpressionManager, merged into amVars. If not filled in === '')
227         // can this be added in the first computation of $redata?
228         if (isset($_SESSION['survey_'.$surveyid]['srid'])) {
229             $saved_id = $_SESSION['survey_'.$surveyid]['srid'];
230         }
231 
232         // recompute $redata since $saved_id used to be a global
233         $redata = compact(array_keys(get_defined_vars()));

Stack Trace

#0
+
 /home/httpd/limesurvey/application/controllers/survey/index.php(24): index->action()
19     public $oTemplate;
20 
21     public function run()
22     {
23         useFirebug();
24         $this->action();
25     }
26 
27     public function action()
28     {
29         global $surveyid;
#8
+
 /home/httpd/limesurvey/index.php(194): CApplication->run()
189 require_once APPPATH . 'core/LSYii_Application' . EXT;
190 
191 $config = require_once(APPPATH . 'config/internal' . EXT);
192 
193 Yii::$enableIncludePath = false;
194 Yii::createApplication('LSYii_Application', $config)->run();
195 
196 /* End of file index.php */
197 /* Location: ./index.php */
2024-03-28 13:34:48 Apache Yii Framework/1.1.19