push
This commit is contained in:
@@ -15,7 +15,8 @@ export default async function SuperAdminLayout({
|
||||
}
|
||||
|
||||
const superAdminEmail = process.env.SUPERADMIN_EMAIL || 'superadmin@innungsapp.de'
|
||||
if (session.user.email !== superAdminEmail) {
|
||||
const isSuperAdmin = session.user.email === superAdminEmail || session.user.role === 'admin'
|
||||
if (!isSuperAdmin) {
|
||||
redirect('/dashboard') // Normal admins go back to dashboard
|
||||
}
|
||||
|
||||
@@ -25,12 +26,20 @@ export default async function SuperAdminLayout({
|
||||
<header className="bg-gray-900 text-white border-t-2 border-brand-500 border-b border-gray-800">
|
||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div className="flex justify-between h-12 items-center">
|
||||
<span
|
||||
className="font-bold text-base tracking-tight"
|
||||
style={{ fontFamily: "'Syne', system-ui, sans-serif" }}
|
||||
>
|
||||
Super Admin
|
||||
</span>
|
||||
<div className="flex items-center gap-8">
|
||||
<span
|
||||
className="font-bold text-base tracking-tight hover:text-gray-200 transition-colors"
|
||||
style={{ fontFamily: "'Syne', system-ui, sans-serif" }}
|
||||
>
|
||||
<Link href="/superadmin">Super Admin</Link>
|
||||
</span>
|
||||
|
||||
{/* Super Admin Navigation */}
|
||||
<nav className="hidden md:flex gap-6 text-sm font-medium text-gray-400">
|
||||
<Link href="/superadmin" className="hover:text-white transition-colors">Übersicht</Link>
|
||||
<Link href="/superadmin/landingpages" className="hover:text-white transition-colors">Landingpages</Link>
|
||||
</nav>
|
||||
</div>
|
||||
<span className="text-xs text-gray-400">{session.user.email}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user