sync: 鍚屾灞€鍩熺綉鏈€鏂颁唬鐮?(source master @ b69568e4)
This commit is contained in:
1 parent
4f7f07504a
commit
8bc8b0e082
1651 files changed
+278599
-11416
No files matched your search
+17
-5
@@ -18,6 +18,20 @@ from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from deerflow.persistence.base import Base
|
||||
from deerflow.persistence.types import BeijingDateTime
|
||||
|
||||
|
||||
class AuthInitializationRow(Base):
|
||||
"""Singleton transaction claim for the public first-admin setup endpoint."""
|
||||
|
||||
__tablename__ = "auth_initialization"
|
||||
id: Mapped[str] = mapped_column(String(32), primary_key=True)
|
||||
|
||||
|
||||
class AuthUsernameRow(Base):
|
||||
"""Reserve new account local-parts across concurrent email-domain variants."""
|
||||
|
||||
__tablename__ = "auth_usernames"
|
||||
username: Mapped[str] = mapped_column(String(128), primary_key=True)
|
||||
|
||||
|
||||
class UserRow(Base):
|
||||
@@ -56,11 +70,9 @@ class UserRow(Base):
|
||||
# 时把已存在行置为已放行。
|
||||
approved: Mapped[bool] = mapped_column(Boolean, nullable=False, default=True, server_default=text("1"))
|
||||
|
||||
# 管理员在「白名单管理」页给个别账号设置的「登录口令」(**明文**)。非空 → 该账号的
|
||||
# 用户名直登(``POST /api/v1/auth/login/username``)必须带 ``?password=`` 且与此值
|
||||
# 完全一致才放行(优先于全局共享口令门);为空/NULL → 走原有逻辑(全局共享口令门
|
||||
# 或免口令)。明文存储是有意为之:口令本就以 URL query 明文传输,存明文才能让管理员
|
||||
# 随时复制完整登录链接 ``…/login/<用户名>?password=xxxx``。仅 admin 可读写。
|
||||
# Unified password/passphrase. New writes store the same versioned hash as
|
||||
# password_hash; historical plaintext remains accepted until the next reset.
|
||||
# Never serialize hashes into user-list or login responses.
|
||||
login_password: Mapped[str | None] = mapped_column(String(255), nullable=True)
|
||||
|
||||
# 岗位 (position) the user is assigned to (1:1). NULL = no explicit
|
||||
|
||||
Reference in new issue
Block a user