CHttpException

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

/app/application/controllers/survey/index.php(238)

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

Stack Trace

#0
+
 /app/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
+
 /app/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 09:59:11 Apache/2.4.7 (Ubuntu) Yii Framework/1.1.20