You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,20 @@ For Google Authentication & Firebase you need to use your own google-services.js
16
16
17
17
You may need to include an api key in your [manifest.xml](https://github.com/khammami/journal-app/blob/411291d3934ded74f1d1c4bfec80a900a321c2a8/app/src/main/AndroidManifest.xml#L29) for Fabric if you want or just remove it.
18
18
19
+
**Firestore rules I've used:**
20
+
```
21
+
match /databases/{database}/documents {
22
+
match /users/{userId}/{document=**} {
23
+
allow read, write: if request.auth.uid == userId;
24
+
}
25
+
26
+
match /users/{userId}/posts/{postId} {
27
+
allow write: if request.resource.data.updatedAt > resource.data.updatedAt;
28
+
allow write: if !exists(/databases/$(database)/documents/users/$(request.auth.uid)/posts/$(request.resource.data.id))
0 commit comments