reader/backend/firestore.rules
yanlong.wang 89d6d49f06
wip
2024-04-10 19:32:07 +08:00

33 lines
926 B
Plaintext

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;
}
}
}