If you need to test the admin panel RIGHT NOW without setting up the role, you can temporarily allow any authenticated user to access it.
-
Open
src/routes/AdminPage.jsx -
Find this line (around line 220):
if (role === "admin") {
-
Replace it with:
// TEMPORARY: Allow any authenticated user for testing if (role === "admin" || (process.env.NODE_ENV === "development" && user?.id)) {
-
Save the file and refresh
Now ANY authenticated user can access the admin panel in development mode.
Before deploying to production, REMOVE the temporary bypass and ensure proper role setup!
Once you've tested everything works:
- Remove the temporary bypass
- Run the SQL in
supabase/FIX_YOUR_EMAIL.sqlto set your admin role - Clear browser storage and sign in again