From fb6bc71a79525e0587aa699ec153804e30f86e53 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 7 Sep 2023 09:49:56 +0200 Subject: [PATCH] adjust group limit to remove native windmill groups --- backend/windmill-api/src/groups.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/windmill-api/src/groups.rs b/backend/windmill-api/src/groups.rs index b557cdfbf7..e40c36e777 100644 --- a/backend/windmill-api/src/groups.rs +++ b/backend/windmill-api/src/groups.rs @@ -201,12 +201,12 @@ pub async fn require_is_owner( } async fn _check_nb_of_groups(db: &DB) -> Result<()> { - let nb_groups = sqlx::query_scalar!("SELECT COUNT(*) FROM group_ WHERE name != 'all'",) + let nb_groups = sqlx::query_scalar!("SELECT COUNT(*) FROM group_ WHERE name != 'all' AND name != 'error_handler' AND name != 'slack'",) .fetch_one(db) .await?; if nb_groups.unwrap_or(0) >= 5 { return Err(Error::BadRequest( - "You have reached the maximum number of groups without an enterprise license" + "You have reached the maximum number of groups (5) without an enterprise license" .to_string(), )); }