sync: 鍚屾灞€鍩熺綉鏈€鏂颁唬鐮?(source master @ b69568e4)

This commit is contained in:
gozeros committed 2026-10-21 14:51:31 +08:00
1 parent 4f7f07504a
commit 8bc8b0e082
1651 files changed
+278599 -11416

No files matched your search

@@ -23,8 +23,14 @@ _cached_assumed_user: User | None = None
def is_auth_disabled() -> bool:
"""Return True when auth gate should be bypassed (development / local tooling)."""
return os.environ.get("DEER_FLOW_AUTH_DISABLED", "").strip().lower() in ("1", "true", "yes", "on")
"""Enabled password or single-session login overrides the dev bypass."""
requested = os.environ.get("DEER_FLOW_AUTH_DISABLED", "").strip().lower() in ("1", "true", "yes", "on")
if not requested:
return False
from deerflow.config.system_settings import load_system_settings
policy = load_system_settings().authentication
return not (policy.password_login_enabled or policy.single_session_enabled)
def _row_to_user(row: UserRow) -> User: