From dc6647efbf09386ba69986f8ef3445625bd36ae4 Mon Sep 17 00:00:00 2001 From: Marco Allegretti Date: Thu, 5 Mar 2026 13:25:51 +0100 Subject: [PATCH] Gate WASM cron hooks behind plugin_allow_background_jobs --- backend/src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/src/main.rs b/backend/src/main.rs index 68089bf..366e278 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -334,7 +334,9 @@ async fn run() -> Result<(), StartupError> { // WASM plugins need per-community context. let community_ids: Vec = - match sqlx::query_scalar("SELECT id FROM communities WHERE is_active = true") + match sqlx::query_scalar( + "SELECT id FROM communities WHERE is_active = true AND settings->>'plugin_allow_background_jobs' = 'true'", + ) .fetch_all(&cron_pool) .await {