firebase / firebase/friendlyeats-web

Example firestore.rules and description are not matched

Open
#72 0 comments 0 reactions 1 assignee Claimed by @jhuleatt View on GitHub
Dominant language
JavaScript
Stars
597
Forks
456
PR merge metrics
No merged PRs in 30d

Description

In "12 Secure your data", below description is not match to example firestore.rules.

```
Updates to a restaurant document can only change the ratings, not the name or any other immutable data.
```

firestore.rules restrict to update only `name`.

```
allow update: if request.auth != null
&& request.resource.data.name == resource.data.name
```

Either description or firestore.rules is incorrect.
I think firestore.rules is incorrect. Probably this is correct rule.

```
allow update: if request.auth != null
&& request.resource.data.name == resource.data.name
&& request.resource.data.city == resource.data.city
&& request.resource.data.price == resource.data.price
&& request.resource.data.category == resource.data.category
&& request.resource.data.photo == resource.data.photo;
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.