protected function failedAuthorization() { if ($this->container['request'] instanceof Request) { throw new HttpException(403); } parent::failedAuthorization(); }