Skip to content

Commit

Permalink
Fix issues writing to Firestore (#46)
Browse files Browse the repository at this point in the history
# Fix firestore rules

## ♻️ Current situation & Problem
The firestore rules were ill-formatted and therefore all write to the
firestore simulator were rejected. This PR fixes this problem by
updating the `firestore.rules` configuration to include the version
information and fixing syntax issues.


## ⚙️ Release Notes 
* Fixed issues writing to Firestore


## 📚 Documentation
--


## ✅ Testing
--

## 📝 Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md).
  • Loading branch information
Supereg authored Oct 24, 2023
1 parent 5796d90 commit 092d431
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion firestore.rules
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// Allow only authenticated content owners access
match /users/{userId}/{documents=**} {
allow read, write: if request.auth != null && request.auth.uid == userId
allow read, write: if request.auth != null && request.auth.uid == userId;
}
}
}

0 comments on commit 092d431

Please sign in to comment.