Skip to content

Conversation

vincanger
Copy link
Collaborator

Description

Fixes #492 by removing the user authorization hook and adding an immediate guard in the default admin layout component.

Contributor Checklist

Make sure to do the following steps if they are applicable to your PR:

@vincanger vincanger requested a review from FranjoMindek August 18, 2025 13:19
Copy link
Contributor

@FranjoMindek FranjoMindek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems okay.

page AdminMessagesPage {
authRequired: true,
component: import AdminMessages from "@src/messages/MessagesPage"
component: import AdminMessages from "@src/admin/dashboards/messages/MessagesPage"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch


const Dashboard = ({ user }: { user: AuthUser }) => {
useRedirectHomeUnlessUserIsAdmin({ user });

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove this blank space

@vincanger vincanger merged commit 6a52e45 into main Sep 11, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Admin dashboard UI (not data) is partially exposed to any logged in user

2 participants