Fix T38210: phabricator file downloads not working for non-logged in users.
This commit is contained in:
@@ -10,6 +10,10 @@ final class PhabricatorFileDataController extends PhabricatorFileController {
|
||||
$this->key = $data['key'];
|
||||
}
|
||||
|
||||
public function shouldAllowPublic() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function shouldRequireLogin() {
|
||||
return false;
|
||||
}
|
||||
|
@@ -4,6 +4,10 @@ final class PhabricatorFileInfoController extends PhabricatorFileController {
|
||||
|
||||
private $phid;
|
||||
|
||||
public function shouldAllowPublic() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function willProcessRequest(array $data) {
|
||||
$this->phid = $data['phid'];
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@ final class PhabricatorActionView extends AphrontView {
|
||||
* viewing.
|
||||
*/
|
||||
public function getHref() {
|
||||
if ($this->workflow || $this->renderAsForm) {
|
||||
if (($this->workflow || $this->renderAsForm) && !$this->download) {
|
||||
if (!$this->user || !$this->user->isLoggedIn()) {
|
||||
return id(new PhutilURI('/auth/start/'))
|
||||
->setQueryParam('next', (string)$this->getObjectURI());
|
||||
|
Reference in New Issue
Block a user