mirror of
https://github.com/openai/codex.git
synced 2026-11-07 20:30:33 +00:00
Drop permission policy changes from context fragment PR
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
co-authored by
Codex
parent
3954e00f53
commit
a000166a4d
+18
-1579
File diff suppressed because it is too large
Load Diff
@@ -214,13 +214,12 @@ pub(super) async fn apply_granted_turn_permissions(
|
||||
_ => false,
|
||||
};
|
||||
|
||||
let sandbox_permissions = if effective_permissions.is_some()
|
||||
&& !sandbox_permissions.requires_additional_permissions()
|
||||
{
|
||||
SandboxPermissions::WithAdditionalPermissions
|
||||
} else {
|
||||
sandbox_permissions
|
||||
};
|
||||
let sandbox_permissions =
|
||||
if effective_permissions.is_some() && !sandbox_permissions.uses_additional_permissions() {
|
||||
SandboxPermissions::WithAdditionalPermissions
|
||||
} else {
|
||||
sandbox_permissions
|
||||
};
|
||||
|
||||
EffectiveAdditionalPermissions {
|
||||
sandbox_permissions,
|
||||
|
||||
@@ -381,7 +381,7 @@ impl ShellHandler {
|
||||
// continue through the normal exec approval flow for the command.
|
||||
if effective_additional_permissions
|
||||
.sandbox_permissions
|
||||
.requires_escalated_permissions()
|
||||
.requests_sandbox_override()
|
||||
&& !effective_additional_permissions.permissions_preapproved
|
||||
&& !matches!(
|
||||
turn.approval_policy.value(),
|
||||
|
||||
@@ -187,7 +187,7 @@ impl ToolHandler for UnifiedExecHandler {
|
||||
// continue through the normal exec approval flow for the command.
|
||||
if effective_additional_permissions
|
||||
.sandbox_permissions
|
||||
.requires_escalated_permissions()
|
||||
.requests_sandbox_override()
|
||||
&& !effective_additional_permissions.permissions_preapproved
|
||||
&& !matches!(
|
||||
context.turn.approval_policy.value(),
|
||||
|
||||
Reference in New Issue
Block a user