清理: 授权开关注释去箭头装饰符
This commit is contained in:
@@ -326,7 +326,7 @@ pub(crate) async fn process_tool_calls(
|
|||||||
.clone();
|
.clone();
|
||||||
let allowed_guard = allowed_snapshot.read().await.clone();
|
let allowed_guard = allowed_snapshot.read().await.clone();
|
||||||
// 「信任所有目录」总开关(KV df-ai-path-auth-bypass,默认关):开启后白名单外路径不再挂起
|
// 「信任所有目录」总开关(KV df-ai-path-auth-bypass,默认关):开启后白名单外路径不再挂起
|
||||||
// 授权弹窗(NeedsAuth→直接放行),黑名单 Denied 仍硬拒(凭据目录自保护不受影响)。
|
// 授权弹窗(NeedsAuth 时直接放行),黑名单 Denied 仍硬拒(凭据目录自保护不受影响)。
|
||||||
// 读取失败按关处理(fail-safe,默认行为不变);前端设置页改后下一轮 process_tool_calls 即生效。
|
// 读取失败按关处理(fail-safe,默认行为不变);前端设置页改后下一轮 process_tool_calls 即生效。
|
||||||
let path_auth_bypass = app_handle
|
let path_auth_bypass = app_handle
|
||||||
.state::<crate::state::AppState>()
|
.state::<crate::state::AppState>()
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ pub(crate) fn check_file_tool_auth(
|
|||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
/// bypass 开:白名单外路径 NeedsAuth → 直接 Authorized;bypass 关:行为不变(仍 NeedsAuth)。
|
/// bypass 开:白名单外路径 NeedsAuth 时直接 Authorized;bypass 关:行为不变(仍 NeedsAuth)。
|
||||||
#[test]
|
#[test]
|
||||||
fn test_bypass_on_needs_auth_becomes_authorized() {
|
fn test_bypass_on_needs_auth_becomes_authorized() {
|
||||||
let allowed = crate::state::AllowedDirs::default();
|
let allowed = crate::state::AllowedDirs::default();
|
||||||
|
|||||||
Reference in New Issue
Block a user