Repository navigation
fix(server): show the server's paths on Preferences to admins only - #642
Merged
Merged
Conversation
The Preferences page listed the full paths of the aisle file, the pantry file and the recipe directory to anyone who could open it, which with sign-in on includes guests. That told any visitor the server's directory layout and, usually, the account it runs as. It came with the new UI in e200582; since cooklang#621 (d682b15) only `--recipes-only` blanked them. Admins still get the full paths; with sign-in off that is everyone, so a local server looks as before. Everyone else sees where a file is inside the recipe directory (`config/aisle.conf`), "Global configuration" for one outside it, and no Recipe Directory card. "Not configured" is now translated through the existing `pref-not-configured` key. Closes cooklang#637 Co-Authored-By: Claude Opus 5.5 <[email protected]>
LeMyst
marked this pull request as ready for review
October 7, 2026 21:22
This was referenced Oct 10, 2026
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.
Closes #637.
The Preferences page listed the full paths of the aisle file, the pantry file and the recipe directory (
/home/<user>/recipes/config/aisle.conf) to anyone who could open it. With sign-in on, that includes guests. It came with the new UI in e200582; since #621 (d682b15) only--recipes-onlyblanked them.What changes
config/aisle.conf, or Global configuration for a file outside the recipe directory--recipes-onlyvisitorpreferences_page(src/server/ui.rs) picks the path to show withviewer.can_admin(), the same check that already gates the sync section.pref-not-configuredkey instead of being hard-coded in English;pref-global-configis added in every locale.Tests
tests/server_auth_test.rs:config/pantry.confrelative, and a globalaisle.confshown as "Global configuration" without naming the config directory;admingets the full paths.The guest and role tests fail on
main.cargo fmt,cargo clippy --all-targets(no warnings) andcargo testpass.🤖 Generated with Claude Code