feat: remove self host judgement
This commit is contained in:
parent
a34908d301
commit
d5427b8d7e
@ -617,16 +617,16 @@ class RegisterService:
|
|||||||
|
|
||||||
if open_id is not None or provider is not None:
|
if open_id is not None or provider is not None:
|
||||||
AccountService.link_account_integrate(provider, open_id, account)
|
AccountService.link_account_integrate(provider, open_id, account)
|
||||||
if dify_config.EDITION != "SELF_HOSTED":
|
|
||||||
should_create_workspace = not is_invite_member or (
|
should_create_workspace = not is_invite_member or (
|
||||||
is_invite_member and dify_config.ALLOW_CREATE_WORKSPACE
|
is_invite_member and dify_config.ALLOW_CREATE_WORKSPACE
|
||||||
)
|
)
|
||||||
|
|
||||||
if should_create_workspace:
|
if should_create_workspace:
|
||||||
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
|
||||||
tenant_was_created.send(tenant)
|
tenant_was_created.send(tenant)
|
||||||
|
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user