diff --git a/backend/windmill-api-configs/src/lib.rs b/backend/windmill-api-configs/src/lib.rs index 35ace8d6a3..de4be9cf9c 100644 --- a/backend/windmill-api-configs/src/lib.rs +++ b/backend/windmill-api-configs/src/lib.rs @@ -23,7 +23,7 @@ use windmill_common::{ DB, }; -use windmill_api_auth::{ApiAuthed, require_devops_role}; +use windmill_api_auth::{require_devops_role, ApiAuthed}; pub fn global_service() -> Router { Router::new() @@ -128,12 +128,15 @@ async fn update_config( require_devops_role(&db, &authed.email).await?; #[cfg(not(feature = "enterprise"))] - if name.starts_with("worker__") { - return Err(error::Error::BadRequest( - "Worker groups configurable from UI available only in the enterprise version" - .to_string(), - )); - } + let config = if name.starts_with("worker__") { + // In CE, only allow setting worker_tags (and cache_clear for cache management) + serde_json::json!({ + "worker_tags": config.get("worker_tags"), + "cache_clear": config.get("cache_clear") + }) + } else { + config + }; if name.starts_with("worker__") { let periodic_script_bash = config diff --git a/frontend/src/lib/components/WorkerGroup.svelte b/frontend/src/lib/components/WorkerGroup.svelte index 820f21599e..7392ff4dc6 100644 --- a/frontend/src/lib/components/WorkerGroup.svelte +++ b/frontend/src/lib/components/WorkerGroup.svelte @@ -226,9 +226,9 @@ } // Centralized permission logic - let canEditConfig = $derived($enterpriseLicense && ($superadmin || $devopsRole)) + let canEditConfig = $derived($superadmin || $devopsRole) let hasEnterpriseFeatures = $derived($enterpriseLicense) - let isReadOnly = $derived(!canEditConfig) + let canEditEEConfig = $derived(canEditConfig && hasEnterpriseFeatures) const dispatch = createEventDispatcher() @@ -340,12 +340,11 @@ drawer?.closeDrawer()} title={canEditConfig ? `Edit worker config '${name}'` : `Worker config '${name}'`} - eeOnly > {#if !hasEnterpriseFeatures} - - Workers can still have their WORKER_TAGS, INIT_SCRIPT and WHITELIST_ENVS passed as env. - Dedicated workers are an enterprise only feature. + + Some worker management features require the enterprise edition. In CE, you can configure + worker tags. {:else if !canEditConfig} @@ -355,7 +354,7 @@