sync update from LAN repo (source dhk-1 @ 3b1ec5b4)
This commit is contained in:
1 parent
da6521b6cb
commit
264e2200d6
995 files changed
+148105
-13399
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:
|
||||
|
||||
Reference in new issue
Block a user