Skip to content

Commit

Permalink
Fix frontend permissions for admin page
Browse files Browse the repository at this point in the history
  • Loading branch information
julianweng committed Dec 8, 2023
1 parent 9ce3206 commit ff4b9ea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions frontend/pages/admin/[[...slug]].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ function AdminPage({
}): ReactElement {
if (!userInfo) {
return <AuthPrompt />
} else if (!userInfo.is_superuser) {
return (
<AuthPrompt title="Whoops!" hasLogin={false}>
Admin permissions are required to access this page.
</AuthPrompt>
)
}

const router = useRouter()
Expand Down

0 comments on commit ff4b9ea

Please sign in to comment.