1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-11 08:06:13 +01:00

Fix a policy error for restricted applications in a profile menu

Ref T12174. This could improperly raise a policy error. Instead, hide the menu item.

Auditors: chad
This commit is contained in:
epriestley 2017-02-04 07:08:49 -08:00
parent 43fae71e17
commit 027de23970

View file

@ -60,12 +60,12 @@ final class PhabricatorApplicationProfileMenuItem
$viewer = $this->getViewer(); $viewer = $this->getViewer();
$phid = $config->getMenuItemProperty('application'); $phid = $config->getMenuItemProperty('application');
$app = id(new PhabricatorApplicationQuery()) $apps = id(new PhabricatorApplicationQuery())
->setViewer($viewer) ->setViewer($viewer)
->withPHIDs(array($phid)) ->withPHIDs(array($phid))
->executeOne(); ->execute();
return $app; return head($apps);
} }
protected function newNavigationMenuItems( protected function newNavigationMenuItems(