fix(ui): stop offering LAN settings that do nothing on a loopback-only install - #1259
Merged
Conversation
…y install Managed service LAN access sat in its own card below LAN exposure and could be switched on while lerd was bound to loopback, so the dashboard stated "loopback only, LAN devices cannot reach it" directly above a switch offering those devices access to every database. Flipping it published nothing, it only stored a preference for later. The setting now lives inside the LAN exposure card, under the control it depends on, and both it and the host actions switch stay hidden while lerd is loopback-only. Enabling either one is refused by the CLI and by the API as well, so the dashboard is not the only thing holding the line. Turning either off always works, and a setting that is already on keeps showing even after an unexpose, so re-exposing cannot quietly republish databases or hand host access back out. The remote dashboard access card goes the same way once it has nothing to offer. Configured credentials keep it visible so they can be rotated or cleared, and disabled-DNS mode keeps it because that card is its only route to LAN exposure.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Managed service LAN access shipped as its own card below LAN exposure, and it could be switched on while lerd was still bound to loopback. That put a card reading "loopback only, LAN devices cannot reach it" directly above a switch offering those same devices access to every database, and flipping it published nothing at all, it only stored a preference for a later expose.
The setting now sits inside the LAN exposure card, under the control it depends on, so the relationship is visible rather than implied by ordering. While lerd is loopback-only it is not shown, and neither is the host actions switch in the remote dashboard access card. Enabling either one is also refused by the CLI and the API, so hiding a control in the dashboard is not the only thing holding the line.
Two states stay visible on purpose. A setting that is already on keeps showing after an unexpose, because otherwise re-exposing would silently republish databases or hand host access back out with nobody having asked for it in that session, and turning either setting off always works so an armed preference can still be cleared. The remote dashboard access card likewise stays when credentials are configured, so they can be rotated or cleared, and in disabled-DNS mode where that card is the only route to LAN exposure at all.
The managed service block moved into its own component so it can render nested inside the LAN card or standalone in disabled-DNS mode without the markup existing twice.
Refs #1247.