Extend fine-grained ACL to settings, content, shop, and radio.

Gate pages and mutations on module PERMS instead of dashboard-only staff checks, add radio view/edit slugs with migration 0015, and expand the operations contract tests.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
2026-07-15 20:11:55 +02:00
co-authored by Cursor
parent f2427b3483
commit 3c8a8ff888
32 changed files with 244 additions and 70 deletions
+15
View File
@@ -0,0 +1,15 @@
import { redirect } from "next/navigation";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
export default async function RadioAdminLayout({
children,
}: {
children: React.ReactNode;
}) {
const { session, permissions } = await getAdminContext();
if (!canAccess(permissions, PERMS.RADIO_VIEW, session.user.rank)) {
redirect("/admin");
}
return children;
}