Skip to content

Commit 2d47d29

Browse files
feat: only allow higher roles until we have route-based rules
1 parent 6442f7b commit 2d47d29

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/app/dashboard/layout.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ export default async function AdminLayout({ children }: { children: React.ReactN
1818
if (!roles || roles.length === 0) redirect("/onboarding/no-role")
1919
if (roles.includes("creator")) redirect("/onboarding/unauthorized")
2020

21+
// temp until we have route-based permissions check
22+
if (roles.includes("owner") || roles.includes("direttivo") || roles.includes("president"))
23+
redirect("/onboarding/unauthorized")
24+
2125
return (
2226
<>
2327
<AdminHeader />

0 commit comments

Comments
 (0)