-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirestore.rules
More file actions
116 lines (90 loc) · 3.2 KB
/
firestore.rules
File metadata and controls
116 lines (90 loc) · 3.2 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /daos/{document=**} {
allow read;
}
match /daosFlatTree/{document=**} {
allow read;
}
match /daoNotionIntegrations/{document=**} {
allow read;
}
match /{path=**}/members/{memberId} {
allow read; //: if request.auth.uid == resource.data.userId;
}
match /proposals/{document=**} {
allow read;
}
match /governance/{document=**} {
allow read;
}
match /users/{userId} {
allow read;
allow update: if request.auth.uid == userId;
}
match /usersActivity/{userId} {
allow read, create, update: if request.auth.uid == userId;
}
match /userMemberships/{userId} {
allow read: if request.auth.uid == userId;
}
match /users/{userId}/feedItemFollows/{feedItemFollowId} {
allow read;
}
match /users/{userId}/inbox/{inboxItemId} {
allow read: if request.auth.uid == userId;
}
match /userFeatureFlags/{userId} {
allow read: if request.auth.uid == userId;
}
match /featureFlags/{document=**} {
allow read;
}
match /discussion/{discussionId} {
allow read;
}
match /discussionMessage/{messageId} {
allow read;
}
match /discussionMessage/{messageId}/reaction/{document=**} {
allow read;
}
match /notification/{document=**} {
allow read;
}
match /subscriptions/{subscriptionId} {
allow read: if "trustee" in get(/databases/$(database)/documents/users/$(request.auth.uid)).data.roles;
allow read: if request.auth.uid == resource.data.userId;
}
match /payments/{paymentId} {
allow read;
}
match /bankAccountDetails/{bankAccountDetailsId}{
allow read: if "trustee" in get(/databases/$(database)/documents/users/$(request.auth.uid)).data.roles;
allow read: if request.auth.uid == resource.data.userId;
}
match /cards/{cardId} {
allow read: if !exists(/databases/$(database)/documents/cards/$(cardId));
allow read: if request.auth.uid == resource.data.ownerId;
}
match /supporters/{supportersFlowId} {
allow read;
}
match /chatChannel/{chatChannelId} {
allow read: if request.auth != null && request.auth.uid in resource.data.participants;
}
match /chatChannel/{chatChannelId}/chatMessages/{chatMessageId} {
allow read: if request.auth != null && request.auth.uid in get(/databases/$(database)/documents/chatChannel/$(chatChannelId)).data.participants;
}
match /chatChannel/{chatChannelId}/chatMessages/{chatMessageId}/reaction/{document=**} {
allow read: if request.auth != null && request.auth.uid in get(/databases/$(database)/documents/chatChannel/$(chatChannelId)).data.participants;
}
match /chatChannel/{chatChannelId}/chatMessages/{chatMessageId}/chatMessagesUserUnique/{chatMessagesUserUniqueId} {
allow read: if request.auth != null && request.auth.uid == resource.data.userId;
}
match /chatChannel/{chatChannelId}/chatChannelUserUnique/{chatChannelUserUniqueId} {
allow read: if request.auth != null && request.auth.uid == resource.data.userId;
}
}
}