コード例 #1
0
ファイル: AccessControl.php プロジェクト: apurey/cmf
 /**
  * Returns a value indicating whether the filer is active for the given action.
  * @param \yii\base\Action $action the action being filtered
  * @return boolean whether the filer is active for the given action.
  */
 protected function isActive($action)
 {
     if ($action->getUniqueId() === Yii::$app->getErrorHandler()->errorAction) {
         return false;
     }
     return parent::isActive($action);
 }
コード例 #2
0
ファイル: AccessControl.php プロジェクト: yii2mod/yii2-rbac
 /**
  * @inheritdoc
  */
 protected function isActive($action)
 {
     if ($this->isErrorPage($action) || $this->isLoginPage($action) || $this->isAllowedAction($action)) {
         return false;
     }
     return parent::isActive($action);
 }
コード例 #3
0
ファイル: AccessControl.php プロジェクト: reuhtte/yii2-admin
 /**
  * Returns a value indicating whether the filter is active for the given action.
  * @param InlineAction $action the action being filtered
  * @return boolean whether the filer is active for the given action.
  */
 protected function isActive($action)
 {
     $uniqueId = $action->getUniqueId();
     if ($uniqueId === Yii::$app->getErrorHandler()->errorAction) {
         return false;
     } else {
         if (Yii::$app->user->isGuest && Yii::$app->user->loginUrl == $uniqueId) {
             return false;
         }
     }
     return parent::isActive($action);
 }