From b786bbdab50d47c6a5e77486459126945084206b Mon Sep 17 00:00:00 2001 From: Xin Zhang Date: Fri, 25 Apr 2025 09:52:47 +0800 Subject: [PATCH] fix: add workspace limitation in invite-login API (#18724) --- api/services/account_service.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/services/account_service.py b/api/services/account_service.py index 19885860d9..b11815664e 100644 --- a/api/services/account_service.py +++ b/api/services/account_service.py @@ -893,7 +893,10 @@ class RegisterService: if open_id is not None and provider is not None: AccountService.link_account_integrate(provider, open_id, account) - if FeatureService.get_system_features().is_allow_create_workspace and create_workspace_required: + if (FeatureService.get_system_features().is_allow_create_workspace + and create_workspace_required + and FeatureService.get_system_features().license.workspaces.is_available() + ): tenant = TenantService.create_tenant(f"{account.name}'s Workspace") TenantService.create_tenant_member(tenant, account, role="owner") account.current_tenant = tenant