/** * Checks if the user is the owner of the file. Stop the request if not. * * @param App_Model_File $file * @param App_Model_User $user */ protected function checkOwner(App_Model_File $file, $user) { if ($file->isOwner($user)) { return; } halt(HTTP_UNAUTHORIZED, __('You are not the owner of the file')); }