Merge branch 'develop' of http://47.106.207.27:3000/AI260626/Mutual_Fund into develop_feature_customer

# Conflicts:
#	.gitignore
#	api/deps.py
#	api/router.py
#	main.py
#	tests/test_customer_agent_router.py
#	tests/test_knowledge_router.py
This commit is contained in:
2026-09-11 14:25:37 +08:00
19 changed files with 302 additions and 87 deletions
+10
View File
@@ -30,6 +30,16 @@ async def get_current_user(
return user
async def require_knowledge_operator(user: SysUser = Depends(get_current_user)) -> SysUser:
"""Allow only administrators or explicitly assigned knowledge operators."""
if user.user_type == "ADMIN":
return user
if user.user_type != "EMPLOYEE" or user.employee_role not in KNOWLEDGE_OPERATOR_ROLES:
raise ForbiddenError("仅运营人员可以管理知识库")
return user
async def require_knowledge_operator(
user: SysUser = Depends(get_current_user),
) -> SysUser: