manifold/firestore.rules

34 lines
662 B
Plaintext
Raw Permalink Normal View History

2022-01-05 17:42:43 +00:00
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /users/{userId} {
allow read;
allow create: if request.auth != null;
}
match /contracts/{contractId} {
allow read;
allow delete: if resource.data.creatorId == request.auth.uid;
2022-01-05 17:42:43 +00:00
}
2022-01-05 22:52:54 +00:00
match /contracts/{contractId}/bets/{betId} {
2022-01-05 17:42:43 +00:00
allow read;
}
2022-01-05 17:47:39 +00:00
match /{somePath=**}/bets/{betId} {
allow read;
}
2022-01-05 22:52:54 +00:00
match /contracts/{contractId}/comments/{commentId} {
2022-01-05 17:42:43 +00:00
allow read;
allow create: if request.auth != null;
}
2022-01-05 22:52:54 +00:00
match /{somePath=**}/comments/{commentId} {
allow read;
}
2022-01-05 17:42:43 +00:00
}
}