Skip to content

Commit f664c36

Browse files
committed
Add Firestore security rules for formatted_data and data subcollections
1 parent eb42555 commit f664c36

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

firestore.rules

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,20 @@ service cloud.firestore {
2727
allow write: if false;
2828
}
2929

30+
// Add rules for formatted_data subcollection (new)
31+
match /formatted_data/{documentType} {
32+
allow read: if isOwner(userId);
33+
// Only allow Cloud Functions to write
34+
allow write: if false;
35+
}
36+
37+
// Add rules for data subcollection (used for combined data)
38+
match /data/{dataId} {
39+
allow read: if isOwner(userId);
40+
// Only allow Cloud Functions to write
41+
allow write: if false;
42+
}
43+
3044
// Add rules for predictions subcollection
3145
match /predictions/{predictionId} {
3246
allow read: if isOwner(userId);

0 commit comments

Comments
 (0)