diff --git a/application/single_app/functions_governance.py b/application/single_app/functions_governance.py index e394cffe8..029885f9c 100644 --- a/application/single_app/functions_governance.py +++ b/application/single_app/functions_governance.py @@ -1228,8 +1228,9 @@ def ensure_action_type_access( ) if _passes_policy(feature_policy, normalized_user_id, user_group_ids): - _set_request_cache_value(decision_key, True) - return + if not action_type_policies: + _set_request_cache_value(decision_key, True) + return if any(_passes_policy(policy, normalized_user_id, user_group_ids) for policy in action_type_policies): _set_request_cache_value(decision_key, True) diff --git a/docs/explanation/release_notes.md b/docs/explanation/release_notes.md index 5516c8d98..c1c4d1278 100644 --- a/docs/explanation/release_notes.md +++ b/docs/explanation/release_notes.md @@ -54,6 +54,11 @@ Tracking: [#1489](https://github.com/microsoft/simplechat/issues/1489); implemen #### Bug Fixes +* **Delegated Action-Type Policies Now Override Broad Action Access** + * Fixed a governance gap where an explicit delegated item policy for a personal, group, or global action type could still be bypassed by a broader feature-level allow. + * Action-type governance now treats explicit item policies as authoritative once they exist, so a targeted policy such as `personal_action_type = azure_maps` can block that action type even when the broader action feature remains enabled. + * This resolves cases where action types such as Azure Maps continued to appear in action creation flows after admins saved a delegated item policy intended to block them. + * (Ref: delegated item governance, action-type enforcement, `functions_governance.py`) * **Admin Settings Consistency Across Workers** * Removed worker-local admin settings snapshots so reloads read shared Redis settings, or Cosmos directly when Redis is disabled. * Added conflict-checked writes and coordinated cache publication to prevent stale metadata updates, worker startup, and interrupted saves from restoring older settings.