feat(routing): enforce role alignment in automatic dispatch profile switching
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user