Ejemplo n.º 1
0
 /**
  * @param $website
  *
  * @since 1.0
  * @author Choate <*****@*****.**>
  * @return bool
  * @throws ForbiddenHttpException
  */
 public static function checkAccess($website)
 {
     if (!\Yii::$app->user->id || !WebsiteHasUser::find()->can($website, \Yii::$app->user->id)) {
         throw new ForbiddenHttpException(\Yii::t('yii', 'You are not allowed to perform this action.'));
     }
     return true;
 }