-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
144 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
rules_version = '2'; | ||
service cloud.firestore { | ||
match /databases/{database}/documents { | ||
match /{document=**} { | ||
match /places/{placeID} { | ||
allow list: if request.auth != null && resource.data.users[request.auth.uid] >= 0; | ||
// anyone can get to allow search from ShareLink | ||
allow get: if request.auth != null; | ||
// anyone can write to allow update from the invitation - TODO: candidate for a cloud function | ||
allow write: if request.auth != null; | ||
match /{subcollection=**} { | ||
allow read, write: if request.auth != null; | ||
} | ||
} | ||
match /shareLinks/{shareLink=**} { | ||
// allow "list" b/c we query for existing link in the upsert logic | ||
allow read, write: if | ||
request.auth != null | ||
} | ||
match /webAuthnUsers/{userID} { | ||
allow get: if request.auth.uid == userID; | ||
allow list: if false; | ||
allow write: if false; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters