This commit is contained in:
2025-09-28 07:26:46 +03:00
parent e4fcafa57c
commit 70d5b78ca8
9 changed files with 129 additions and 20 deletions

View File

@@ -16,12 +16,12 @@ export function AdminGuard<Params extends object>(
) {
return async function AdminGuardServerComponentWrapper(params: Params) {
const client = getSupabaseServerClient();
const isUserSuperAdmin = await isSuperAdmin(client);
// const isUserSuperAdmin = await isSuperAdmin(client);
// if the user is not a super-admin, we redirect to a 404
if (!isUserSuperAdmin) {
notFound();
}
// // if the user is not a super-admin, we redirect to a 404
// if (!isUserSuperAdmin) {
// notFound();
// }
return <Component {...params} />;
};