From f601093ccc07d1e8c1d3b91572ad9b4c70ef0b3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=9E=E6=B3=95=E6=93=8D=E4=BD=9C?= Date: Wed, 11 Jun 2025 15:38:51 +0800 Subject: [PATCH] fix: only enterprise version request app access mode (#20785) --- web/app/(shareLayout)/layout.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/app/(shareLayout)/layout.tsx b/web/app/(shareLayout)/layout.tsx index 8db336a17d..7de5d51edb 100644 --- a/web/app/(shareLayout)/layout.tsx +++ b/web/app/(shareLayout)/layout.tsx @@ -12,12 +12,18 @@ const Layout: FC<{ }> = ({ children }) => { const isGlobalPending = useGlobalPublicStore(s => s.isGlobalPending) const setWebAppAccessMode = useGlobalPublicStore(s => s.setWebAppAccessMode) + const systemFeatures = useGlobalPublicStore(s => s.systemFeatures) const pathname = usePathname() const searchParams = useSearchParams() const redirectUrl = searchParams.get('redirect_url') const [isLoading, setIsLoading] = useState(true) useEffect(() => { (async () => { + if (!systemFeatures.webapp_auth.enabled) { + setIsLoading(false) + return + } + let appCode: string | null = null if (redirectUrl) appCode = redirectUrl?.split('/').pop() || null