feat: 管理端用户列表显示姓名和公司
This commit is contained in:
@@ -150,6 +150,8 @@ def test_login_stores_password_and_credential_only(monkeypatch) -> None:
|
||||
"last_refresh_at",
|
||||
"credential_valid",
|
||||
"month_hours",
|
||||
"user_name",
|
||||
"company",
|
||||
"hours_month",
|
||||
"monthly_target",
|
||||
"proxy_scheme",
|
||||
@@ -185,6 +187,18 @@ def test_login_stores_password_and_credential_only(monkeypatch) -> None:
|
||||
assert updated["yxt_token"] == "yxt-2"
|
||||
assert "测试用户" not in decrypt_secret(account.credential_cipher)
|
||||
assert "测试用户" not in decrypt_secret(account.password_cipher)
|
||||
assert account.user_name == "测试用户"
|
||||
assert account.company == "测试部门"
|
||||
from euniv.service import _remember_profile
|
||||
|
||||
_remember_profile(db, "6650000146", {"name": " ", "department": "", "level": "Scientist"})
|
||||
db.refresh(account)
|
||||
assert account.user_name == "测试用户"
|
||||
assert account.company == "测试部门"
|
||||
_remember_profile(db, "6650000146", {"name": "新名字", "department": "广州瀚信广州处", "level": "Scientist"})
|
||||
db.refresh(account)
|
||||
assert account.user_name == "新名字"
|
||||
assert account.company == "广州瀚信广州处"
|
||||
|
||||
|
||||
def test_qr_mark_cannot_password_login_and_unicode_password_is_safe(monkeypatch) -> None:
|
||||
|
||||
Reference in New Issue
Block a user