From ff5fcc59d481c142df8d27fe36289a7f1e164d61 Mon Sep 17 00:00:00 2001 From: Alexander Petric Date: Fri, 15 Nov 2024 10:31:42 -0500 Subject: [PATCH] if CLOUD_HOSTED and workspace_id set, autoacknowledge for superadmin (#4719) --- backend/windmill-common/src/utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/windmill-common/src/utils.rs b/backend/windmill-common/src/utils.rs index 1454e8d9ed..a560eead2f 100644 --- a/backend/windmill-common/src/utils.rs +++ b/backend/windmill-common/src/utils.rs @@ -276,7 +276,7 @@ pub async fn report_critical_error( // we ack_global if mute_global is true, or if mute_workspace is true // but we ignore global mute setting for ack_workspace let acknowledge_workspace = mute_workspace; - let acknowledge_global = mute_global || mute_workspace; + let acknowledge_global = mute_global || mute_workspace || ( workspace_id.is_some() && *CLOUD_HOSTED); if let Err(err) = sqlx::query!( "INSERT INTO alerts (alert_type, message, acknowledged, acknowledged_workspace, workspace_id, resource)