Skip to content

Commit

Permalink
firestore.rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Masonga222 committed Aug 28, 2024
1 parent 1b421ba commit 1c4f776
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions firestore.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
rules_version = '2';

service cloud.firestore {
match /databases/{database}/documents {
match /posts/{postId} {
allow read: if request.auth != null;
allow write: if request.auth != null && request.auth.uid == resource.data.userId;
}
}
}

0 comments on commit 1c4f776

Please sign in to comment.