getAllowShare()) { throw new AccessDeniedHttpException('granted_not_allowed_viewing_document'); } return $this->render('document/view.html.twig', [ 'controller_name' => 'DocumentController', 'document' => $Document, 'shared' => true ]); } }