From ff4b9ea9bd5b41d8e306246c511b3c2c36f708e2 Mon Sep 17 00:00:00 2001 From: Julian Weng Date: Fri, 8 Dec 2023 16:17:00 -0500 Subject: [PATCH] Fix frontend permissions for admin page --- frontend/pages/admin/[[...slug]].tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/pages/admin/[[...slug]].tsx b/frontend/pages/admin/[[...slug]].tsx index 919bb27e4..66d79006c 100644 --- a/frontend/pages/admin/[[...slug]].tsx +++ b/frontend/pages/admin/[[...slug]].tsx @@ -27,6 +27,12 @@ function AdminPage({ }): ReactElement { if (!userInfo) { return + } else if (!userInfo.is_superuser) { + return ( + + Admin permissions are required to access this page. + + ) } const router = useRouter()