示例#1
0
 /**
  * @inheritdoc
  */
 public function beforeAction($action)
 {
     $adm = Adm::register();
     if (!parent::beforeAction($action) || !$adm->user->can('AdmRoot')) {
         return false;
     }
     return true;
 }
示例#2
0
 /**
  * @inheritdoc
  */
 public function beforeAction($action)
 {
     $adm = Adm::register();
     //required load adm,if use adm layout
     /*if (!parent::beforeAction($action) || !$adm->user->can('AdmRoot')) {
           throw new ForbiddenHttpException('Access denied');
           return false;
       }*/
     return parent::beforeAction($action);
 }
示例#3
0
 /**
  * @inheritdoc
  */
 public function beforeAction($action)
 {
     if ($action->controller->id !== 'default') {
         $adm = Adm::register();
         //required load adm,if use adm layout
         PageAsset::register(Yii::$app->getView());
     }
     return parent::beforeAction($action);
 }
示例#4
0
 /**
  * @inheritdoc
  */
 public function beforeAction($action)
 {
     $adm = Adm::register();
     if (!parent::beforeAction($action) || !$adm->user->can('Adm-Mailing')) {
         return false;
     }
     MailingAsset::register(Yii::$app->getView());
     return true;
 }
示例#5
-1
 /**
  * @inheritdoc
  */
 public function beforeAction($action)
 {
     $adm = Adm::register();
     //required load adm,if use adm layout
     $adm->params['left-menu-active'][] = 'admlivechat';
     return parent::beforeAction($action);
 }