/** * @inheritdoc */ public function beforeAction($action) { $adm = Adm::register(); if (!parent::beforeAction($action) || !$adm->user->can('AdmRoot')) { return false; } return true; }
/** * @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); }
/** * @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); }
/** * @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; }
/** * @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); }