fix: avoid let-chain to satisfy edition 2021 fmt check
This commit is contained in:
@@ -189,9 +189,10 @@ pub async fn mcp_skills(
|
|||||||
};
|
};
|
||||||
// Enforce workspace scope: an agent can only read a
|
// Enforce workspace scope: an agent can only read a
|
||||||
// workspace-scoped skill from its own workspace.
|
// workspace-scoped skill from its own workspace.
|
||||||
if let Some(ws) = ws
|
let cross_ws = ws
|
||||||
&& ws != user.workspace_id.as_uuid()
|
.map(|w| w != user.workspace_id.as_uuid())
|
||||||
{
|
.unwrap_or(false);
|
||||||
|
if cross_ws {
|
||||||
return err(req.id, -32001, "cross-workspace read denied");
|
return err(req.id, -32001, "cross-workspace read denied");
|
||||||
}
|
}
|
||||||
let skill = match cm_db::repo::skills_catalog::get_by_name(
|
let skill = match cm_db::repo::skills_catalog::get_by_name(
|
||||||
|
|||||||
Reference in New Issue
Block a user