feat(routing): enforce role alignment in automatic dispatch profile switching

This commit is contained in:
2026-07-06 12:42:24 -04:00
parent 5965904c60
commit 21f6425bdb
2 changed files with 71 additions and 0 deletions
+3
View File
@@ -438,6 +438,9 @@ def _ensure_matching_profile(required_permission: str, required_role: str, remot
for p_name, p_data in config["profiles"].items():
p_allowed = p_data.get("allowed_operations") or []
p_forbidden = p_data.get("forbidden_operations") or []
p_role = p_data.get("role") or _role_kind(p_allowed, p_forbidden)
if required_role and p_role != required_role:
continue
p_allowed_n = []
for op in p_allowed:
try: