rules_version = '2'; service cloud.firestore { match /databases/{database}/documents { // Allow read/write access to user's own settings match /users/{userId} { allow read, write: if request.auth != null && request.auth.uid == userId; } // Deny access to all other documents match /{document=**} { allow read, write: if false; } } }