Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13997476
D8298.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D8298.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 25, 4:40 AM (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6747168
Default Alt Text
D8298.diff (2 KB)
Attached To
Mode
D8298: Hide upload JS stuff if user isn't logged in
Attached
Detach File
Event Timeline
Log In to Comment