forked from hoppscotch/hoppscotch
-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
5043606
commit 238e41c
Showing
1 changed file
with
5 additions
and
6 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,14 +1,13 @@ | ||
service cloud.firestore { | ||
match /databases/{database}/documents { | ||
match /{document=**} { | ||
allow read, write: if request.auth.uid != null; | ||
} | ||
// Make sure the uid of the requesting user matches the name of the user | ||
// Make sure the uid of the requesting user matches name of the user | ||
// document. The wildcard expression {userId} makes the userId variable | ||
// available in rules. | ||
match /users/{userId} { | ||
allow read, update, delete: if request.auth.uid == userId; | ||
allow create: if request.auth.uid != null; | ||
allow read, write, create, update, delete: if request.auth.uid != null && request.auth.uid == userId; | ||
} | ||
match /users/{userId}/{document=**} { | ||
allow read, write, create, update, delete: if request.auth.uid != null && request.auth.uid == userId; | ||
} | ||
} | ||
} |