@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Hide upload JS stuff if user isn't logged in

Summary: ...cuz it won't work. I think adding a "login to upload" has no real value as this is a pretty unexpected / power user feature anyway. Fixes T4354.

Test Plan: tried to upload as a logged out user to Phabricator home. my browser just loaded the file as expected.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, epriestley, aran

Maniphest Tasks: T4354

Differential Revision: https://secure.phabricator.com/D8298

+11 -2
+2 -1
src/applications/files/controller/PhabricatorFileListController.php
··· 78 78 $list_view->addItem($item); 79 79 } 80 80 81 - $list_view->appendChild(new PhabricatorGlobalUploadTargetView()); 81 + $list_view->appendChild(id(new PhabricatorGlobalUploadTargetView()) 82 + ->setUser($user)); 82 83 83 84 return $list_view; 84 85 }
+1
src/applications/files/controller/PhabricatorFileUploadController.php
··· 65 65 $title = pht('Upload File'); 66 66 67 67 $global_upload = id(new PhabricatorGlobalUploadTargetView()) 68 + ->setUser($user) 68 69 ->setShowIfSupportedID($support_id); 69 70 70 71 $form_box = id(new PHUIObjectBoxView())
+5
src/applications/files/view/PhabricatorGlobalUploadTargetView.php
··· 14 14 } 15 15 16 16 public function render() { 17 + $viewer = $this->getUser(); 18 + if (!$viewer->isLoggedIn()) { 19 + return null; 20 + } 21 + 17 22 $instructions_id = celerity_generate_unique_node_id(); 18 23 19 24 require_celerity_resource('global-drag-and-drop-css');
+3 -1
src/applications/home/controller/PhabricatorHomeMainController.php
··· 75 75 $this->minipanels, 76 76 ); 77 77 78 + $user = $this->getRequest()->getUser(); 78 79 $nav->appendChild($content); 79 - $nav->appendChild(new PhabricatorGlobalUploadTargetView()); 80 + $nav->appendChild(id(new PhabricatorGlobalUploadTargetView()) 81 + ->setUser($user)); 80 82 81 83 return $this->buildApplicationPage( 82 84 $nav,