Skip to content

Commit 7949ec4

Browse files
committed
Merge branch 'develop'
2 parents 00cf9c8 + f823beb commit 7949ec4

File tree

932 files changed

+29096
-2882
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

932 files changed

+29096
-2882
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+

cloud/firebase.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
]
1515
}
1616
],
17+
"firestore": [{
18+
"database": "default",
19+
"rules": "firestore/firestore.default.rules"
20+
}],
1721
"emulators": {
1822
"auth": {
1923
"port": 9099
@@ -30,6 +34,7 @@
3034
"singleProjectMode": true
3135
},
3236
"hosting": {
37+
"site": "voxxrin-v3",
3338
"public": "hosting/public",
3439
"ignore": [
3540
"firebase.json",
@@ -38,12 +43,9 @@
3843
],
3944
"rewrites": [
4045
{
41-
"source": "**",
46+
"source": "!(/assets/**|/favicon.*|/sw.js|/manifest.webmanifest)",
4247
"destination": "/index.html"
4348
}
4449
]
45-
},
46-
"hosting:voxxrin-v3": {
47-
"site": "voxxrin-v3"
4850
}
4951
}
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
rules_version = '2';
2+
service cloud.firestore {
3+
match /databases/{database}/documents {
4+
function iAm(userId) { return request != null && request.auth != null && request.auth.uid == userId }
5+
function onlyAllowedUpdatedFields(allowedFieldNames) {
6+
return allowedFieldNames != null
7+
&& request != null
8+
&& request.resource != null
9+
&& request.resource.data != null
10+
&& resource != null
11+
&& resource.data != null
12+
&& resource.data.diff(request.resource.data).affectedKeys().hasOnly(allowedFieldNames)
13+
}
14+
15+
// By default, prevent reads & writes on any node
16+
match /{document=**} {
17+
allow read, write: if false;
18+
}
19+
20+
match /event-family-tokens/{familyId} {
21+
allow read, write: if false;
22+
}
23+
24+
match /public-tokens/{publicSecretToken} {
25+
allow get: if true;
26+
allow list, write: if false;
27+
}
28+
29+
match /crawlers/{crawlerId} {
30+
allow read, write: if false;
31+
}
32+
33+
match /schema-migrations/self {
34+
allow read, write: if false;
35+
}
36+
37+
match /events/{event} {
38+
allow read: if true;
39+
allow write: if false;
40+
41+
match /days/{dayId} {
42+
allow read: if true;
43+
allow write: if false;
44+
}
45+
46+
match /event-descriptor/self {
47+
allow get: if true;
48+
allow list, write: if false;
49+
}
50+
51+
match /talksStats/{talkId} {
52+
allow read: if true;
53+
allow write: if false;
54+
}
55+
56+
match /organizer-space/{secretOrganizerToken} {
57+
allow get: if true;
58+
allow list, write: if false;
59+
60+
match /ratings/self {
61+
allow read, write: if false;
62+
}
63+
}
64+
65+
match /last-updates/self {
66+
allow get: if true;
67+
allow list, write: if false;
68+
}
69+
70+
match /talks/{talkId} {
71+
allow read: if true;
72+
allow write: if false;
73+
74+
match /feedbacks-access/{secretFeedbackViewerToken} {
75+
allow get: if true;
76+
allow list, write: if false;
77+
78+
match /feedbacks/{userPublicToken} {
79+
allow read: if true;
80+
allow write: if false;
81+
}
82+
}
83+
}
84+
}
85+
86+
match /users/{userId} {
87+
allow list, create, delete: if false;
88+
allow get: if iAm(userId);
89+
allow update: if iAm(userId) && onlyAllowedUpdatedFields(["userLastConnection"]);
90+
91+
match /preferences/self {
92+
allow get, create, update: if iAm(userId);
93+
allow delete, list: if false;
94+
}
95+
match /tokens-wallet/self {
96+
allow get, create, update: if iAm(userId);
97+
allow delete, list: if false;
98+
}
99+
match /events/{eventId} {
100+
allow get, list, create, update: if iAm(userId);
101+
allow delete: if false;
102+
103+
match /__computed/self {
104+
allow get: if true;
105+
allow list, write: if false;
106+
}
107+
match /talksNotes/{talkId} {
108+
allow get, list, create, update: if iAm(userId);
109+
allow delete: if false;
110+
}
111+
match /days/{dayId} {
112+
allow get, list, create, update: if iAm(userId);
113+
allow delete: if false;
114+
115+
match /feedbacks/self {
116+
allow get, create, update: if iAm(userId);
117+
allow list, delete: if false;
118+
}
119+
}
120+
}
121+
}
122+
}
123+
}

0 commit comments

Comments
 (0)