Küçük ölçekli projemde bunu kullanıyorum hocam
authu users collectionunda saklıyorsanız siz de kullanabilirsiniz
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// users koleksiyonu altındaki her kullanıcı dokümanı
match /users/{userId} {
// Kullanıcı sadece kendi dokümanını okuyup yazabilir
allow read, write: if request.auth != null && request.auth.uid == userId;
// Tüm alt koleksiyonlar için geçerli
match /{subCollection=**}/{docId} {
// Kullanıcı sadece kendi alt koleksiyonuna erişebilir
allow read, write: if request.auth != null && request.auth.uid == userId;
}
}
}
}
Çok teşekkür ederim hocam