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.
Details
Details
- Reviewers
chad - Maniphest Tasks
- T5867: Move Quick Create to MenuItemEngine
- Commits
- rPb21cd24341c6: When Favorites is uninstalled or not visible to the viewer, hide the menu
- 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
Diff Detail
- Repository
- rP Phabricator
- Branch
- favorites1
- Lint
Lint Passed - Unit
Tests Passed - Build Status
Buildable 15305 Build 20144: Run Core Tests Build 20143: arc lint + arc unit
Event Timeline
Comment Actions
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.