public function beforeAction($action)
 {
     if (!$this->getSpace()->isAdmin()) {
         throw new CHttpException(403, 'Access denied - Space Administrator only!');
     }
     return parent::beforeAction($action);
 }
Ejemplo n.º 2
0
 public function beforeAction($action)
 {
     $this->checkContainerAccess();
     $this->hideSidebar = true;
     $assetPrefix = Yii::app()->assetManager->publish(dirname(__FILE__) . '/../assets', true, 0, defined('YII_DEBUG'));
     Yii::app()->clientScript->registerCssFile($assetPrefix . '/wiki.css');
     if ($this->contentContainer instanceof Space && !$this->contentContainer->isMember()) {
         throw new CHttpException(403, 'You need to be member of this space to this wiki!');
     }
     return parent::beforeAction($action);
 }