CHttpException

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

/var/www/limesurvey/application/controllers/survey/index.php(245)

233         if ($this->_surveyCantBeViewedWithCurrentPreviewAccess($surveyid, $isSurveyActive, $surveyExists)) {
234             $bPreviewRight = $this->_userHasPreviewAccessSession($surveyid);
235 
236             if ($bPreviewRight === false) {
237                 $event    = new PluginEvent('onSurveyDenied');
238                 $event->set('surveyId', $surveyid);
239                 $event->set('reason', 'noPreviewPermission');
240 
241                 App()->getPluginManager()->dispatchEvent($event);
242                 if(Permission::getUserId()) {
243                     throw new CHttpException(403, gT("We are sorry but you don't have permissions to do this.",'unescaped'));
244                 }
245                 throw new CHttpException(401, gT("We are sorry but you don't have permissions to do this.",'unescaped'));
246             }
247         }
248 
249         // TODO can this be moved to the top?
250         // (Used to be global, used in ExpressionManager, merged into amVars. If not filled in === '')
251         // can this be added in the first computation of $redata?
252         if (isset($_SESSION['survey_'.$surveyid]['srid'])) {
253             $saved_id = $_SESSION['survey_'.$surveyid]['srid'];
254         }
255 
256         // recompute $redata since $saved_id used to be a global
257         $redata = compact(array_keys(get_defined_vars()));

Stack Trace

#0
+
 /var/www/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
+
 /var/www/limesurvey/index.php(195): CApplication->run()
190 require_once APPPATH . 'core/LSYii_Application' . EXT;
191 
192 $config = require_once(APPPATH . 'config/internal' . EXT);
193 
194 Yii::$enableIncludePath = false;
195 Yii::createApplication('LSYii_Application', $config)->run();
196 
197 /* End of file index.php */
198 /* Location: ./index.php */
2024-03-29 12:40:33 Apache/2.4.18 (Ubuntu) Yii Framework/1.1.22-dev