fix: keep tenant document entries visible
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user