From 5aedfe2695518de4cdb4fc300c13847abeda11d9 Mon Sep 17 00:00:00 2001
From: wxg0103 <727495428@qq.com>
Date: Tue, 3 Nov 2026 14:15:18 +0800
Subject: [PATCH] chore: enhance access token handling and improve query
parameter management
---
apps/common/auth/constants/group_constants.py | 2 +-
.../access-restriction/AccessRestrictionDrawer.vue | 8 ++++++--
.../access-restriction/ButtonAccessRestriction.vue | 5 ++++-
ui/src/views/application-detail/overview/index.vue | 7 ++++++-
ui/src/views/chat/login/index.vue | 12 +++++++++---
.../authentication/components/CAS.vue | 2 +-
.../authentication/components/LoginSetting.vue | 2 +-
7 files changed, 28 insertions(+), 10 deletions(-)
diff --git a/apps/common/auth/constants/group_constants.py b/apps/common/auth/constants/group_constants.py
index d57d2165fea..66c56f46fe8 100644
--- a/apps/common/auth/constants/group_constants.py
+++ b/apps/common/auth/constants/group_constants.py
@@ -67,7 +67,7 @@ class Group(Enum):
# 对话相关
CHAT_USER_GROUP = ("CHAT_USER_GROUP", _("Chat User Group"))
CHAT_USER_AUTH = ("CHAT_USER_AUTH", _("Chat User Auth"))
- PORTAL = ("PORTAL", _("portal"))
+ PORTAL = ("PORTAL", _("Portal Setting"))
# 其他
OTHER = ("OTHER", _("Other"))
HOMEPAGE = ("HOMEPAGE", _("Home page"))
diff --git a/ui/src/views/application-detail/overview/access-restriction/AccessRestrictionDrawer.vue b/ui/src/views/application-detail/overview/access-restriction/AccessRestrictionDrawer.vue
index d0a66cd9ead..fa773e428a5 100644
--- a/ui/src/views/application-detail/overview/access-restriction/AccessRestrictionDrawer.vue
+++ b/ui/src/views/application-detail/overview/access-restriction/AccessRestrictionDrawer.vue
@@ -9,9 +9,11 @@ import { LOGIN_METHOD_LABELS } from '@/constants/auth'
import { useStore } from '@/stores/admin'
import { MsgSuccess } from '@/utils/message'
import { useApplicationDetailContext } from '../../context'
+import type { ApplicationAccessToken } from '@/api/types'
defineOptions({ name: 'AccessRestrictionDrawer' })
+const props = defineProps<{ initialConfig?: ApplicationAccessToken }>()
const emit = defineEmits<{ closed: [] }>()
const { auth } = useStore()
const { applicationId, resourceApi } = useApplicationDetailContext()
@@ -49,8 +51,10 @@ function handleLoginMethodsChange() {
function loadAccessRestriction() {
if (loading.value) return
loading.value = true
- return resourceApi.application
- .getAccessToken(applicationId.value)
+ // 优先复用概览页已获取的配置,避免重复请求 access_token 接口。
+ const fetchConfig = () =>
+ props.initialConfig ? Promise.resolve(props.initialConfig) : resourceApi.application.getAccessToken(applicationId.value)
+ return fetchConfig()
.then((config) => {
Object.assign(form, {
language: config.language,
diff --git a/ui/src/views/application-detail/overview/access-restriction/ButtonAccessRestriction.vue b/ui/src/views/application-detail/overview/access-restriction/ButtonAccessRestriction.vue
index a22a98136c3..e3b8434641d 100644
--- a/ui/src/views/application-detail/overview/access-restriction/ButtonAccessRestriction.vue
+++ b/ui/src/views/application-detail/overview/access-restriction/ButtonAccessRestriction.vue
@@ -1,6 +1,9 @@
diff --git a/ui/src/views/system/settings/authentication/components/LoginSetting.vue b/ui/src/views/system/settings/authentication/components/LoginSetting.vue
index a8826888967..aae724083c6 100644
--- a/ui/src/views/system/settings/authentication/components/LoginSetting.vue
+++ b/ui/src/views/system/settings/authentication/components/LoginSetting.vue
@@ -254,7 +254,7 @@ onActivated(() => {
-
+