public function __construct(\Request $request, \Response $response) { $this->project = Model::factory('Project')->where("share_hash", "=", $request->param('hash'))->find(); if (!$this->project->loaded() or $this->project->visibility->name == "privat") { throw new HTTP_Exception_404(__('This page seems to not exists.')); } if ($this->project->visibility->name == "secure") { if (!$this->visitor_authorized($request->param('hash')) and $request->action() != 'authenticate') { $this->redirect('/share/' . $request->param('hash') . '/project/authenticate/'); } } parent::__construct($request, $response); }