From ec02cfac2eecf610cbdd9c2e98b891f8f5310127 Mon Sep 17 00:00:00 2001 From: devsargam Date: Mon, 1 Apr 2024 02:11:59 +0530 Subject: [PATCH] fix: admin enabled in dev mode --- src/app/admin/layout.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/admin/layout.tsx b/src/app/admin/layout.tsx index f21fe4708..94ac00a2b 100644 --- a/src/app/admin/layout.tsx +++ b/src/app/admin/layout.tsx @@ -13,6 +13,10 @@ export default async function AdminLayout({ return redirect('/signin'); } + if (process.env.LOCAL_CMS_PROVIDER) { + return <>{children} + } + if (!process.env.ADMINS?.split(',').includes(session.user.email!)) { return notFound(); }