Skip to content

Latest commit

 

History

History
85 lines (60 loc) · 2.2 KB

File metadata and controls

85 lines (60 loc) · 2.2 KB

✅ FIXED: Firestore Permission Error

🐛 The Problem

You were getting "Missing or insufficient permissions" errors when trying to access your user profile.

✅ The Fix

I've updated and redeployed the Firestore security rules to properly allow users to:

  • ✅ Read their own profile
  • ✅ Write/update their own profile
  • ✅ Create their own profile

🚀 What to Do Now

Step 1: Refresh the Page

  1. Hard refresh your browser (Ctrl+F5 on Windows, Cmd+Shift+R on Mac)
  2. Or just reload the page normally

Step 2: The Profile Wizard Should Work Now

If you're still on the profile completion page:

  • Fill out the form
  • Click "Complete Profile"
  • It should save successfully now

Step 3: Or Skip to Admin Dashboard

Since you're an admin, you can also just go directly to:

https://rretoriq25.web.app/admin/dashboard

The admin bypass is already in place, so you don't need to complete the profile if you don't want to.


🔧 What Was Changed

File: firestore.rules

Before: Rules had allow update: if true which was being overridden

After: Simplified to:

match /users/{userId} {
  // Users can read and write their own profile
  allow read, write: if request.auth != null && request.auth.uid == userId;
  
  // Users can create their own profile
  allow create: if request.auth != null && request.auth.uid == userId;
  
  // Users can update their own profile
  allow update: if request.auth != null && request.auth.uid == userId;
}

📊 Current Status

Issue Status
✅ Firestore permissions FIXED - Rules deployed
✅ Admin claim Set for your account
✅ Admin bypass Profile completion optional
⚠️ Vercel env vars Still need to be set

🎯 Next Steps

Option 1: Complete Your Profile

  • Refresh the page
  • Fill out the profile form
  • Click "Complete Profile"
  • Should work now!

Option 2: Go to Admin Dashboard


Firestore rules deployed:
Ready to use:
Try it now!