fix: keep tenant document entries visible

This commit is contained in:
wren
2026-05-22 17:29:05 +08:00
parent 993f1525dd
commit 0309df1cf7
2 changed files with 29 additions and 0 deletions
@@ -30,6 +30,11 @@ class HomeServiceImpl(IHomeService):
"/chat-with-llm/chat",
"/cross-checking",
)
_DOCUMENT_ENTRY_TARGETS: tuple[str, ...] = (
"/files/upload",
"/documents",
"/documents/list",
)
def __init__(self) -> None:
self.RbacService = RbacServiceImpl()
@@ -404,6 +409,9 @@ class HomeServiceImpl(IHomeService):
def _isAllowedTargetPath(self, TargetPath: str, AllowedPaths: set[str]) -> bool:
"""判断首页目标路径是否被当前用户路由树覆盖。"""
if TargetPath in self._DOCUMENT_ENTRY_TARGETS:
return True
if TargetPath in AllowedPaths:
return True