wip
This commit is contained in:
@@ -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} />;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user