This repository has been archived by the owner on Sep 21, 2023. It is now read-only.
forked from amlcloud/screensite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
firestore.rules
66 lines (57 loc) · 1.81 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
function isAdmin() {
return exists(/databases/$(database)/documents/admin/$(request.auth.uid));
}
match /{document=**} {
allow read: if request.auth != null;
}
match /case/{indexId} {
allow read : if request.auth != null;
allow write,create,update,delete: if request.auth != null;
match /message/{messageId} {
allow read : if request.auth != null;
allow write,create,update,delete: if request.auth != null;
}
match /search/{searchId} {
allow read : if request.auth != null;
allow write,create,update,delete: if request.auth != null;
}
}
match /index/{indexId} {
allow read: if request.auth != null;
allow write,create,update,delete: if false;
}
match /list/{listId} {
allow read: if request.auth != null;
allow update: if isAdmin();
match /{document=**} {
allow read : if request.auth != null;
allow write: if false;
}
match /item/{itemId} {
allow read : if request.auth != null;
allow write: if false;
}
match /fields/{fieldId} {
allow read : if request.auth != null;
allow write: if false;
}
match /indexConfigs/{configId} {
allow read : if request.auth != null;
allow write,create,update,delete: if isAdmin();
match /entityIndexFields/{eiId} {
allow read : if request.auth != null;
allow write,create,update,delete: if isAdmin();
}
}
}
match /user/{userId}/{documents=**} {
allow read, write: if request.auth != null && request.auth.uid == userId
}
match /sandbox/{document=**} {
allow read, write: if true
}
}
}