From 38999e25ac594c6a6fbb4083ccffdc8491c910f9 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 26 Mar 2018 07:14:00 -0700 Subject: [PATCH] Support logged-out access to the document rendering endpoint Summary: Ref T13105. Currently, logged-out users can't render documents via the endpoint even if they otherwise have access to the file. Test Plan: Viewed a file as a logged-out user and re-rendered it via Ajax. Reviewers: mydeveloperday Reviewed By: mydeveloperday Maniphest Tasks: T13105 Differential Revision: https://secure.phabricator.com/D19258 --- .../files/controller/PhabricatorFileDocumentController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/applications/files/controller/PhabricatorFileDocumentController.php b/src/applications/files/controller/PhabricatorFileDocumentController.php index b74d98f48e..61bf4427cf 100644 --- a/src/applications/files/controller/PhabricatorFileDocumentController.php +++ b/src/applications/files/controller/PhabricatorFileDocumentController.php @@ -7,6 +7,10 @@ final class PhabricatorFileDocumentController private $engine; private $ref; + public function shouldAllowPublic() { + return true; + } + public function handleRequest(AphrontRequest $request) { $viewer = $request->getViewer();