feat: add editorial approval and account guards
This commit is contained in:
1 parent
a8d4e54ffb
commit
3584b4a7a7
9 files changed
+878
-1
No files matched your search
@@ -0,0 +1,25 @@
|
||||
import type { ReactNode } from "react";
|
||||
|
||||
import { headers } from "next/headers";
|
||||
import Link from "next/link";
|
||||
|
||||
import { requireAdmin } from "@/modules/auth/principal";
|
||||
|
||||
export default async function AdminLayout({ children }: Readonly<{ children: ReactNode }>) {
|
||||
await requireAdmin(new Headers(await headers()));
|
||||
|
||||
return (
|
||||
<main className="portal-shell">
|
||||
<header className="masthead">
|
||||
<Link className="wordmark" href="/admin">
|
||||
Leon Tonhäuser
|
||||
</Link>
|
||||
<span className="section-label">Administration</span>
|
||||
</header>
|
||||
<nav aria-label="Administration">
|
||||
<Link href="/admin/redaktionen">Redaktionen</Link>
|
||||
</nav>
|
||||
{children}
|
||||
</main>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user