Fix the inert peering admin menu (#131) #132
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/peering-menu-inert"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two lines, both in
web/static/index.html.1. The reported bug — a
ReferenceErrorfrom a false guard. The handler was() => { closeUserMenu && closeUserMenu(); openPeeringDialog(); }.closeUserMenuis undeclared anywhere;&&does not protect against an undeclared identifier (only against a declared-falsy one), so the arrow function threwReferenceErroron its first token andopenPeeringDialog()never ran. Now usescloseMenus(), the function every sibling handler uses.2. Wrong visibility gate. Was
!feat.lic— peering is an admin surface and is free-tier, so a free-tier admin was denied the button and a licensed non-admin was shown one that 403s. Now!(me && me.admin), mirroringum-settings.Verified:
closeUserMenuno longer appears anywhere; both inline<script>blocks passnode --check.Not visually confirmed, and a caveat for the dogfood
Same limit as #105 — structure and syntax are checked, layout is not. And the dogfood has no
peering.statePathset, soPeeringAPIis nil server-side: after this fix the dialog will open butpeerRefreshwill 404 because the peering subsystem isn't enabled. That is expected until peering is configured (#106 territory). The design choice of whether to hide the button entirely until peering is enabled (a boot probe, option B on the issue) is left for Nikola; this PR ships the correct-for-configured behaviour.