Skip to content

Commit

Permalink
fix: admin enabled in dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
devsargam committed Mar 31, 2024
1 parent 0cc2fa5 commit ec02cfa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app/admin/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit ec02cfa

Please sign in to comment.