1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-29 18:22:41 +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 9c62a10989
commit 29114bea5f

View file

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