Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Updating Rules to be correct (resource.data.property)
  • Loading branch information
asciimike authored Oct 5, 2017
1 parent 3c3892b commit 2d82f1d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions firestore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ service cloud.firestore {
match /databases/{database}/documents {
// Anyone can read a restaurant, only authorized
// users can create, update, or delete them.
match /restaurants/{restaurantId} {
allow read: if true;
allow create, update, delete: if request.auth.uid != null;
match /restaurants/{restaurantId} {
allow read: if true;
allow create, update, delete: if request.auth.uid != null;
}
// Anyone can read a rating. Only the user who made the rating
// can delete it. Ratings can never be updated.
match /restaurants/{restaurantId}/ratings/{ratingId} {
allow read: if true;
allow read: if true;
allow create: if request.auth.uid != null;
allow delete: if request.resource.userId == request.auth.uid;
allow update: if false;
allow delete: if request.resource.data.userId == request.auth.uid;
allow update: if false;
}
}
}
Expand Down

0 comments on commit 2d82f1d

Please sign in to comment.