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
This commit is contained in:
Bob Trahan
2014-02-21 13:04:23 -08:00
parent a84cc1ab73
commit 2a277bbc03
4 changed files with 11 additions and 2 deletions

View File

@@ -75,8 +75,10 @@ final class PhabricatorHomeMainController
$this->minipanels,
);
$user = $this->getRequest()->getUser();
$nav->appendChild($content);
$nav->appendChild(new PhabricatorGlobalUploadTargetView());
$nav->appendChild(id(new PhabricatorGlobalUploadTargetView())
->setUser($user));
return $this->buildApplicationPage(
$nav,