Implement policies in Phragment

Summary: This implements support for enforcing and setting policies in Phragment.

Test Plan: Set policies and ensured they were enforced successfully.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley

CC: Korvin, epriestley, aran

Maniphest Tasks: T4205

Differential Revision: https://secure.phabricator.com/D7751
This commit is contained in:
James Rhodes
2013-12-13 14:42:12 +11:00
parent 7f45824984
commit 86ec4d6021
23 changed files with 350 additions and 47 deletions

View File

@@ -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());