windows-sandbox: accept permission profiles from callers

This commit is contained in:
Michael Bolin
2026-04-30 09:26:53 -07:00
parent 6a9db12adb
commit f63f05f8a6
7 changed files with 54 additions and 54 deletions
+3 -6
View File
@@ -9683,15 +9683,12 @@ impl ChatWidget {
let cwd = self.config.cwd.clone();
let env_map: std::collections::HashMap<String, String> = std::env::vars().collect();
let permission_profile = self.config.permissions.permission_profile();
let policy = crate::permission_compat::legacy_compatible_sandbox_policy(
&permission_profile,
self.config.cwd.as_path(),
);
match codex_windows_sandbox::apply_world_writable_scan_and_denies(
match crate::legacy_core::windows_sandbox::apply_world_writable_scan_and_denies(
self.config.codex_home.as_path(),
cwd.as_path(),
&env_map,
&policy,
&permission_profile,
self.config.cwd.as_path(),
Some(self.config.codex_home.as_path()),
) {
Ok(_) => None,