Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
chore: remove weird account login (#22247)
ZalterCitty4ee49f355068
diff --git a/.gitignore b/.gitignoreindex 03ff04d8231..bc354e639e1 100644--- a/.gitignore+++ b/.gitignore@@ -198,6 +198,7 @@ sdks/python-client/dify_client.egg-info!.vscode/launch.json.template!.vscode/README.mdapi/.vscode+web/.vscode# vscode Code History Extension.historydiff --git a/api/controllers/service_api/wraps.py b/api/controllers/service_api/wraps.pyindex 4d71e58396a..2df00d9fc70 100644--- a/api/controllers/service_api/wraps.py+++ b/api/controllers/service_api/wraps.py@@ -63,27 +63,6 @@ def validate_app_token(view: Optional[Callable] = None, *, fetch_user_arg: Optioif tenant.status == TenantStatus.ARCHIVE:raise Forbidden("The workspace's status is archived.")- tenant_account_join = (- db.session.query(Tenant, TenantAccountJoin)- .where(Tenant.id == api_token.tenant_id)- .where(TenantAccountJoin.tenant_id == Tenant.id)- .where(TenantAccountJoin.role.in_(["owner"]))- .where(Tenant.status == TenantStatus.NORMAL)- .one_or_none()- ) # TODO: only owner information is required, so only one is returned.- if tenant_account_join:- tenant, ta = tenant_account_join- account = db.session.query(Account).where(Account.id == ta.account_id).first()- # Login admin- if account:- account.current_tenant = tenant- current_app.login_manager._update_request_context_with_user(account) # type: ignore- user_logged_in.send(current_app._get_current_object(), user=_get_user()) # type: ignore- else:- raise Unauthorized("Tenant owner account does not exist.")- else:- raise Unauthorized("Tenant does not exist.")-kwargs["app_model"] = app_modelif fetch_user_arg: