feat: self host not create workspace

pull/8904/head
Joe 2 years ago
parent d3d0d6451a
commit 9a6918069d

@ -177,6 +177,9 @@ class AccountService:
account = AccountService.create_account(
email=email, name=name, interface_language=interface_language, password=password
)
# SELF_HOSTED Just create account, not create tenant
if dify_config.EDITION != "SELF_HOSTED":
TenantService.create_owner_tenant_if_not_exist(account=account)
return account
@ -662,6 +665,7 @@ class RegisterService:
if open_id is not None or provider is not None:
AccountService.link_account_integrate(provider, open_id, account)
if dify_config.EDITION != "SELF_HOSTED":
if not dify_config.ALLOW_CREATE_WORKSPACE:
raise WorkSpaceNotAllowedCreateError()

Loading…
Cancel
Save