Page MenuHomePhabricator

When Favorites is uninstalled or not visible to the viewer, hide the menu
ClosedPublic

Authored by epriestley on Jan 18 2017, 2:07 PM.
Tags
None
Referenced Files
F19811956: D17219.diff
Wed, Mar 4, 3:07 AM
F19650960: D17219.id41416.diff
Feb 6 2026, 10:31 AM
F19511833: D17219.diff
Jan 12 2026, 8:23 AM
F19505708: D17219.id41416.diff
Jan 9 2026, 1:34 PM
F19270994: D17219.id41418.diff
Dec 22 2025, 10:39 PM
F19000132: D17219.diff
Nov 20 2025, 10:57 PM
F18906763: D17219.id41418.diff
Nov 8 2025, 8:20 PM
F18836331: D17219.id41418.diff
Oct 27 2025, 12:02 AM
Subscribers
None

Details

Summary

Ref T5867. The executeOne() currently raises a policy exception if the application isn't visible to the viewer, or we fatal if the application has been uninstalled.

Test Plan
  • Viewed pages with the application uninstalled, saw working pages with no favorites menu.
  • Viewed pages with the application restricted, saw working pages with no favorites menu.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

As a general note, executeOne() currently forces setRaisePolicyExceptions(true).

We have a handful of cases, like this one, where we basically want to do this:

...
->setRaisePolicyExceptions(false)
->executeOne();

...meaning "just return null if the user can't see the thing, instead of raising a policy exception". We usually do that with execute() + head(), today, as I did here.

At some point, I think we should either make that pattern work, or provide a way to do that which works, like executeOneWithoutPolicyExceptions(). However, making it work might have some weird side effects and I couldn't come up with a very good name for executeOneWithoutPolicyExceptions(), so I'm just punting for now until I hit this again.

This revision is now accepted and ready to land.Jan 18 2017, 3:09 PM
This revision was automatically updated to reflect the committed changes.