fix(plugin)!: move the user network config commands under Tauri's ACL - #15
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
zippy
force-pushed
the
security/user-network-acl
branch
from
September 24, 2026 18:13
826140a to
5d96747
Compare
zippy
marked this pull request as ready for review
September 25, 2026 14:37
mattyg
reviewed
Sep 28, 2026
mattyg
previously approved these changes
Sep 28, 2026
mattyg
left a comment
Member
There was a problem hiding this comment.
Requesting a few tests, otherwise lgtm
get_, default_ and set_user_network_config were app commands, so any webview could call them. As plugin commands (plugin:hc|...) the capability system decides: hc:default grants the two reads, and set, which repoints bootstrap and relay and restarts the app, needs hc:allow-set-user-network-config. A missing UserNetworkConfigPath is now an error instead of a panic.
…ult permission set
zippy
force-pushed
the
security/user-network-acl
branch
from
September 29, 2026 17:47
59b6f4f to
c84377e
Compare
…the command end to end
|
✔️ 1671a0e...3b2d5fc - Conventional commits check succeeded. |
mattyg
approved these changes
Sep 30, 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.
Summary
get_,default_andset_user_network_configwere app commands, so any webview in the app could call them, includingset, which repoints the conductor's bootstrap and relay servers and restarts the app. They are now plugin commands (plugin:hc|…), so Tauri's capability system decides who may call them.hc:defaultgrants the two reads.setneedshc:allow-set-user-network-config, granted by name to the window that hosts the settings screen.permissions/default.tomldocuments what is left out of the default set and why. Calling any of the three without a managedUserNetworkConfigPathreturnsError::UserNetworkConfigPathNotManagedinstead of panicking.Breaking for consumers: remove the three commands from
generate_handler!, keep.manage(UserNetworkConfigPath(..)), and invoke them with theplugin:hc|prefix. Rust stops compiling until the first step is done; the JSinvokecalls fail at run time until the third. The generator template is updated; emergence has the matching edits pending.TODO:
npm run cipasses