feat: 权限细化、商业认证跳转、UI改进
权限: - viewer 管理配方页只显示我的配方,隐藏公共配方库和工具栏 - 高级编辑者可看到精油价目信息不全的红色提示 - 商业核算删除按钮仅管理员可见 - 搜索未收录通知只发管理员和高级编辑者 Tab 可见性: - 所有用户可见:配方查询、管理配方、个人库存、精油价目、商业核算 - 需登录的 tab 点击弹登录框,登录后跳转 - 操作日志/Bug/用户管理仅管理员可见 商业核算: - 未认证用户可看项目列表,点详情提示去认证 - 跳转到我的账户页商业认证区域并自动滚动 其他: - 我的配方和收藏配方默认折叠 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -324,7 +324,7 @@ def symptom_search(body: dict, user=Depends(get_current_user)):
|
||||
# If user reports no match, notify editors
|
||||
if body.get("report_missing"):
|
||||
who = user.get("display_name") or user.get("username") or "用户"
|
||||
for role in ("admin", "senior_editor", "editor"):
|
||||
for role in ("admin", "senior_editor"):
|
||||
conn.execute(
|
||||
"INSERT INTO notifications (target_role, title, body) VALUES (?, ?, ?)",
|
||||
(role, "🔍 用户需求:" + query,
|
||||
|
||||
Reference in New Issue
Block a user