Page MenuHomePhabricator

D8298.id19742.diff
No OneTemporary

D8298.id19742.diff

Index: src/applications/files/controller/PhabricatorFileListController.php
===================================================================
--- src/applications/files/controller/PhabricatorFileListController.php
+++ src/applications/files/controller/PhabricatorFileListController.php
@@ -78,7 +78,8 @@
$list_view->addItem($item);
}
- $list_view->appendChild(new PhabricatorGlobalUploadTargetView());
+ $list_view->appendChild(id(new PhabricatorGlobalUploadTargetView())
+ ->setUser($user));
return $list_view;
}
Index: src/applications/files/controller/PhabricatorFileUploadController.php
===================================================================
--- src/applications/files/controller/PhabricatorFileUploadController.php
+++ src/applications/files/controller/PhabricatorFileUploadController.php
@@ -65,6 +65,7 @@
$title = pht('Upload File');
$global_upload = id(new PhabricatorGlobalUploadTargetView())
+ ->setUser($user)
->setShowIfSupportedID($support_id);
$form_box = id(new PHUIObjectBoxView())
Index: src/applications/files/view/PhabricatorGlobalUploadTargetView.php
===================================================================
--- src/applications/files/view/PhabricatorGlobalUploadTargetView.php
+++ src/applications/files/view/PhabricatorGlobalUploadTargetView.php
@@ -14,6 +14,11 @@
}
public function render() {
+ $viewer = $this->getUser();
+ if (!$viewer->isLoggedIn()) {
+ return null;
+ }
+
$instructions_id = celerity_generate_unique_node_id();
require_celerity_resource('global-drag-and-drop-css');
Index: src/applications/home/controller/PhabricatorHomeMainController.php
===================================================================
--- src/applications/home/controller/PhabricatorHomeMainController.php
+++ src/applications/home/controller/PhabricatorHomeMainController.php
@@ -75,8 +75,10 @@
$this->minipanels,
);
+ $user = $this->getRequest()->getUser();
$nav->appendChild($content);
- $nav->appendChild(new PhabricatorGlobalUploadTargetView());
+ $nav->appendChild(id(new PhabricatorGlobalUploadTargetView())
+ ->setUser($user));
return $this->buildApplicationPage(
$nav,

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 3, 3:19 AM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6747168
Default Alt Text
D8298.id19742.diff (2 KB)

Event Timeline