-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfirestore.rules
43 lines (36 loc) · 959 Bytes
/
firestore.rules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /users/{userId} {
allow read: if (request.auth.uid == userId || request.auth.token.email == resource.data.email);
allow write: if false;
match /myBlogs/{blogId} {
allow read: if (request.auth.uid == userId);
allow write: if false;
}
}
match /blogs/{blogId} {
allow read: if true;
allow write: if false;
match /comments/{commentId} {
allow list: if true;
allow write: if false;
match /replies/{replyId} {
allow list: if true;
allow write: if false;
}
}
match /views/{userId} {
allow read: if false;
allow write: if false;
}
match /likes/{userId} {
allow read: if false;
allow write: if false;
}
}
match /{document=**} {
allow read, write: if false;
}
}
}