reader/backend/firestore.rules

33 lines
926 B
Plaintext
Raw Permalink Normal View History

2024-04-10 19:32:07 +08:00
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// match /questions/{document=**} {
// allow read: if request.auth != null
// }
// match /answers/{userId}/profiles/default {
// allow read, write: if request.auth != null && request.auth.uid == userId
// }
match /credits/{userId}/{document=**} {
allow read: if request.auth != null && request.auth.uid == userId
}
match /users/{userId}/prompts/{document=**} {
allow read: if request.auth != null && request.auth.uid == userId
}
// match /users/{userId}/profiles/{document=**} {
// allow read: if request.auth != null && request.auth.uid == userId
// }
match /users/{userId}/creditHistory/{document=**} {
allow read: if request.auth != null && request.auth.uid == userId
}
match /{document=**} {
allow read, write: if false;
}
}
}