mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-16 23:15:54 +08:00
fix: add workspace limitation in invite-login API (#18724)
This commit is contained in:
parent
f45321dd27
commit
b786bbdab5
@ -893,7 +893,10 @@ class RegisterService:
|
|||||||
if open_id is not None and provider is not None:
|
if open_id is not None and provider is not None:
|
||||||
AccountService.link_account_integrate(provider, open_id, account)
|
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")
|
tenant = TenantService.create_tenant(f"{account.name}'s Workspace")
|
||||||
TenantService.create_tenant_member(tenant, account, role="owner")
|
TenantService.create_tenant_member(tenant, account, role="owner")
|
||||||
account.current_tenant = tenant
|
account.current_tenant = tenant
|
||||||
|
Loading…
x
Reference in New Issue
Block a user