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:
parent
43fae71e17
commit
027de23970
1 changed files with 3 additions and 3 deletions
|
@ -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(
|
||||||
|
|
Loading…
Reference in a new issue