mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-23 09:16:49 +08:00
测试增加邮件认证
This commit is contained in:
@@ -7,7 +7,8 @@ import { Flex } from "antd";
|
||||
|
||||
export default async function AdminPage() {
|
||||
const session = await getSession();
|
||||
if (!(session?.user?.name && ADMIN_LIST.includes(session.user.name))) {
|
||||
const name = session?.user?.email || session?.user?.name;
|
||||
if (!(name && ADMIN_LIST.includes(name))) {
|
||||
// Replace '/dashboard' with the desired redirect path
|
||||
redirect("/");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user