From 816598ba81e71fd291771bc83053cd9c31677415 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 Date: Tue, 10 Nov 2026 16:15:28 +0800 Subject: [PATCH] fix: [Portal] If you sign out of the portal while logged in and using an application that requires authentication, the system will trigger three "Access Denied" error messages. --- .../left-sidebar/account-menu/index.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ui/src/conversation-panel/left-sidebar/account-menu/index.vue b/ui/src/conversation-panel/left-sidebar/account-menu/index.vue index d7bd16927b7..6183b57f53a 100644 --- a/ui/src/conversation-panel/left-sidebar/account-menu/index.vue +++ b/ui/src/conversation-panel/left-sidebar/account-menu/index.vue @@ -28,11 +28,17 @@ const tokenPercentage = computed(() => { const userPwdDialogRef = useTemplateRef>('userPwdDialogRef') const apiKeyDialogRef = useTemplateRef>('apiKeyDialogRef') -// 退出对话账号后重新导航,由守卫处理后续认证。 +// 退出对话账号后回到当前场景首页,不停留在上一用户的对话;由守卫决定匿名认证或跳转登录页。 const handleLogout = () => { return auth .logout() - .then(() => router.replace({ path: router.currentRoute.value.fullPath, force: true })) + .then(() => + router.replace( + route.meta.portal + ? { name: 'portal-application-list', force: true } + : { name: 'chat-home', params: { accessToken: route.params.accessToken }, force: true }, + ), + ) .catch(() => {}) }