Skip to content

Commit

Permalink
chore: update rules for viewers collection
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelSolati committed Jun 16, 2020
1 parent 52f3972 commit 609202c
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions firestore.rules
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ service cloud.firestore {
}
match /viewers/{key} {
allow create, update: if request.resource.data.size() == 3
&& request.resource.data.keys().hasAll(['g', 'd', 'l'])
&& request.resource.data.g is string
&& request.resource.data.l is latlng
&& request.resource.data.d.size() == 2
&& request.resource.data.d.keys().hasAll(['coordinates', 'count'])
&& request.resource.data.d.coordinates is latlng
&& request.resource.data.d.count is number;
&& request.resource.data.keys().hasAll(['g', 'coordinates', 'count'])
&& request.resource.data.g.size() == 2
&& request.resource.data.g.geohash is string
&& request.resource.data.g.geopoint is latlng
&& request.resource.data.coordinates is latlng
&& request.resource.data.count is number;
}
match /tests/{key} {
allow read, write: if true;
Expand Down

0 comments on commit 609202c

Please sign in to comment.