mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-08 22:21:45 +00:00
fix(effective_settings): keep cli/server stanzas from user settings.toml
LocalDaemon and RemoteServer modes were stripping owner-specific domains (cli, server) from the user layer as well as from fabro.toml and workflow.toml. Per the plan's trust boundary rule, owner-specific domains should only be consumed from ~/.fabro/settings.toml, so the user layer is the one place they MUST survive. Strip only the workflow and project layers.
This commit is contained in:
parent
d951d0bf82
commit
16204acf0d
1 changed files with 4 additions and 3 deletions
|
|
@ -66,17 +66,18 @@ pub fn resolve_settings(
|
|||
let server_settings = server_settings.ok_or_else(|| {
|
||||
anyhow!("server settings are required for server-targeted settings resolution")
|
||||
})?;
|
||||
// Owner-specific domains (cli, server) may only come from the
|
||||
// local ~/.fabro/settings.toml, never from fabro.toml or
|
||||
// workflow.toml. The user layer keeps its cli/server fields.
|
||||
strip_owner_domains(workflow.as_v2_mut());
|
||||
strip_owner_domains(project.as_v2_mut());
|
||||
let mut stripped_user = user;
|
||||
strip_owner_domains(stripped_user.as_v2_mut());
|
||||
|
||||
let server_defaults = server_defaults_layer(server_settings);
|
||||
|
||||
let mut settings = args
|
||||
.combine(workflow)
|
||||
.combine(project)
|
||||
.combine(stripped_user)
|
||||
.combine(user)
|
||||
.resolve();
|
||||
|
||||
match mode {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue