diff --git a/backend/windmill-api/src/groups.rs b/backend/windmill-api/src/groups.rs index 55904ebf48..0de0a82fab 100644 --- a/backend/windmill-api/src/groups.rs +++ b/backend/windmill-api/src/groups.rs @@ -210,6 +210,19 @@ async fn create_group( check_name_conflict(&mut tx, &w_id, &ng.name).await?; + #[cfg(not(feature = "enterprise"))] + { + let nb_groups = sqlx::query_scalar!("SELECT COUNT(*) FROM group_ WHERE name != 'all'",) + .fetch_one(&mut *tx) + .await?; + if nb_groups.unwrap_or(0) >= 5 { + return Err(Error::BadRequest( + "You have reached the maximum number of groups without an enterprise license" + .to_string(), + )); + } + } + sqlx::query!( "INSERT INTO group_ (workspace_id, name, summary, extra_perms) VALUES ($1, $2, $3, $4)", w_id, diff --git a/frontend/src/lib/components/common/button/Button.svelte b/frontend/src/lib/components/common/button/Button.svelte index b06f17592e..c437b784ac 100644 --- a/frontend/src/lib/components/common/button/Button.svelte +++ b/frontend/src/lib/components/common/button/Button.svelte @@ -174,7 +174,9 @@ on:blur class={twMerge( buttonClass, - disabled ? '!bg-surface-disabled !text-disabled !cursor-not-allowed' : '' + disabled + ? '!bg-surface-disabled !text-tertiary border border-disabled !cursor-not-allowed' + : '' )} {id} tabindex={disabled ? -1 : 0} diff --git a/frontend/src/routes/(root)/(logged)/runs/[...path]/+page.svelte b/frontend/src/routes/(root)/(logged)/runs/[...path]/+page.svelte index 0767344ca7..be0b726248 100644 --- a/frontend/src/routes/(root)/(logged)/runs/[...path]/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/runs/[...path]/+page.svelte @@ -377,7 +377,7 @@