@edgedev/firebase 1.9.21 → 1.9.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/firestore.rules +13 -0
package/package.json
CHANGED
package/src/firestore.rules
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
// #EDGE FIREBASE RULES START
|
|
2
2
|
service cloud.firestore {
|
|
3
3
|
|
|
4
|
+
match /databases/{database}/documents/phone-auth/{phone} {
|
|
5
|
+
allow read: if false;
|
|
6
|
+
allow create: if false;
|
|
7
|
+
allow update: if false;
|
|
8
|
+
allow delete: if false;
|
|
9
|
+
}
|
|
10
|
+
|
|
4
11
|
match /databases/{database}/documents/events/{event} {
|
|
5
12
|
allow read: if false;
|
|
6
13
|
allow create: if false;
|
|
@@ -224,6 +231,12 @@ service cloud.firestore {
|
|
|
224
231
|
let skipPaths = ["collection-data", "users", "staged-users", "events", "rule-helpers"];
|
|
225
232
|
let ruleHelper = get(/databases/$(database)/documents/rule-helpers/$(request.auth.uid)).data;
|
|
226
233
|
return !(collectionPath in skipPaths) &&
|
|
234
|
+
!(permissionCheck == "write" &&
|
|
235
|
+
(
|
|
236
|
+
("stripeCustomerId" in request.resource.data && (!("stripeCustomerId" in resource.data) || resource.data.stripeCustomerId != request.resource.data.stripeCustomerId)) ||
|
|
237
|
+
("stripeSubscription" in request.resource.data && (!("stripeSubscription" in resource.data) || resource.data.stripeSubscription != request.resource.data.stripeSubscription))
|
|
238
|
+
)
|
|
239
|
+
) &&
|
|
227
240
|
request.auth != null &&
|
|
228
241
|
collectionPath in ruleHelper &&
|
|
229
242
|
"permissionCheckPath" in ruleHelper[collectionPath] &&
|