Top menu item is homepage, even if inaccessible


Observed Behavior:
When a global menu item is restricted to logged-in users, logged-out users won’t see it in the menu. Great!
However, http://myphab/ shows the first global menu item, ignoring the restriction. An error is always shown. Boo!

Expected Behavior:
http://myphab/ should show the first menu item accessible by the current user, skipping any they don’t have access to.

Phabricator Version:
phabricator d61944e97b4eee8be91657cd613ffcc030dcf441 (Fri, Nov 23)

Reproduction Steps:

  1. Log in as admin.
  2. Enable public access.
  3. Create an empty dashboard A. Set visibility to “all users”. Install in global menu in first position.
  4. Create an empty dashboard B. Set visibility to “public”. Install in global menu in second position.
  5. Log out
  6. Navigate to http://myphab/

Expect to see an empty dashboard B, but actually see a permissions error for dashboard A.

I want to set up a global menu that starts

  • [user dashboard (all users)]
  • [global dashboard (public)]

so that logged-in users see their own reviews etc, and logged-out users see global state instead.
This almost works - the menu looks right, but logged out users get an error when navigating to /.