Repository navigation
Gate the scoreboard behind LLMVAULT_SCOREBOARD, on by default - #51
Open
incr3d1ble wants to merge 1 commit into
Open
incr3d1ble wants to merge 1 commit into
incr3d1ble wants to merge 1 commit into
Conversation
The scoreboard lists every player's name and score from PROGRESS. On a shared instance that is the point, but on a single-player install it publishes the local player's name to anyone who can reach the server. Operators can now opt out with LLMVAULT_SCOREBOARD=0 (or false). When disabled, /scoreboard answers 404 and the nav links in the sidebar and dashboard hide themselves. Default is unchanged, so existing setups keep working. Fixes CyberSunil#41
This branch has not been deployed
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.
Summary
Implements the primary suggestion from #41: the scoreboard can now be disabled for single-player installs, so the local player's name is no longer published to anyone who can reach the server.
Follows the same opt-in/out env pattern the project already uses for debug mode (
LLMVAULT_DEBUG, #39).Changes
scoreboard_enabled(environ=None)helper next todebug_enabled(). Default is ON (no behaviour change for existing setups);LLMVAULT_SCOREBOARD=0orfalseopts out. The comment explains the why./scoreboardanswers 404 when disabled (the endpoint is simply not there, rather than advertising a locked door). The template context now carriesscoreboard_on.nav_score_item, whichlive_*.htmlalready overrides to empty — no Jinja nesting surprises).test_debug_env.pyhouse style: env helper matrix (default/1/true/empty → on; 0/false → off), route returns 404 when disabled, route renders 200 with content when enabled.Verification
pytest tests/test_scoreboard_env.py -v— 8/8 passtest_expert_unlock.py::test_unlock_events_are_audited_without_secrets) is pre-existing on cleanmain(verified by stashing this change and re-running), unrelated to this PR. Happy to look at it separately if wanted.Fixes #41